purescript-react-example
purescript-react-example copied to clipboard
Argument arity error?
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.
I solved it by putting Todo in parenthesis
renderItem todo' @ (Todo { status }) =
I just started using Elm
, so there might be another solution.