-
Couldn't load subscription status.
- Fork 669
Closed
Description
I'm working with this snippet
points : List a -> List ((a, List a))
points elems =
case elems of
[] ->
[]
(x::xs) ->
(x, xs) :: (List.map (\(b, bs) -> (b, x::bs)) xs)Compiling this code result in a compiler crash:
-- TYPE MISMATCH ---------------------------------------------- DecisionTree.elm
The type annotation for `points` does not match its definition.
142│ points : List a -> List ((a, List a))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The type annotation is saying:
List a -> List ( a, List a )
But I am inferring that the definition has this type:
elm-make: type applications should start with a type atom
checked with elm-make v0.16.0 and elm-lang.org/try
(as an aside: elm-lang.org/try gives no value when the compiler crashes. This may be a conscious decision (maybe security concerns), but I'd rather see what went wrong on the backend)
Metadata
Metadata
Assignees
Labels
No labels