-1

First day with purescript. Followed these steps

pulp repl
:paste
foo x y z = foo + bar
  where
    foo = x + y
    bar = y + z

Get an error

Error found:
in module $PSCI
at  line 1, column 1 - line 1, column 14

  Argument list lengths differ in declaration foo


See https://github.com/purescript/documentation/blob/master/errors/ArgListLengthsDiffer.md for more information,
or to contribute content related to this error.

Went to the hyperlink specified in the error message but that page is almost blank.

I typed 2 spaces for each indentation. If I try to press tab key it says "Display all 136 possibilitie? (y or no)"

Also, is the :paste mode the only way to type in multiple line code in the typescript repl?

Knows Not Much
  • 30,395
  • 60
  • 197
  • 373

1 Answers1

0

Its a problem with my code. I am using foo twice once in defining the outer function and then creating another foo inside. The works fine

baz x y z = foo + bar
  where
    foo = x + y
    bar = y + z
Knows Not Much
  • 30,395
  • 60
  • 197
  • 373