Something is off with the body of the `someFunc` definition:
...
The body is a list of type:
List (Maybe { someField : Bool })
But the type annotation on `someFunc` says it should be:
List SomeRecord
where SomeRecord is defined as
type SomeRecord
= Maybe { someField: Bool }
The error here is missing alias from type SomeRecord, which makes type to have a single variant Maybe, instead of being alias to type Maybe what is used in the function.
This error can be tricky to notice, so it would be nice if compiler could detect that type Maybe and variant Maybe have same name, and report this.
I recently got this kind of error
where
SomeRecord
is defined asThe error here is missing
alias
fromtype SomeRecord
, which makes type to have a single variantMaybe
, instead of being alias to typeMaybe
what is used in the function.This error can be tricky to notice, so it would be nice if compiler could detect that type
Maybe
and variantMaybe
have same name, and report this.