purescript-react-example icon indicating copy to clipboard operation
purescript-react-example copied to clipboard

Argument arity error?

Open roper79 opened this issue 5 years ago • 1 comments

Compiling Example.TodoList Error found: in module Example.TodoList at src/Example/TodoList.purs:57:26 - 57:30 (line 57, column 26 - line 57, column 30)

Data constructor Example.Types.Todo was given 0 arguments in a case expression, but expected 1 arguments. This problem can be fixed by giving Example.Types.Todo 1 arguments.

while inferring the type of $2 ->
$3 ->
case $2 $3 of
todo'@Todo { status: status } -> ... in value declaration todoListClass

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

roper79 avatar Jun 26 '19 14:06 roper79

I solved it by putting Todo in parenthesis renderItem todo' @ (Todo { status }) = I just started using Elm, so there might be another solution.

vlatkoB avatar Sep 11 '19 11:09 vlatkoB