compiler
compiler copied to clipboard
error on correct code using `Identity a = a`
When a function annotation includes a type that contains
type alias Identity a =
a
with an inferred type variable
map : (a -> b) -> Identity a -> Identity b
map change =
change
elm falsely throws an error
Something is off with the body of the `map` definition:
map change = change
^^^^^^
This `change` value is a:
a -> b
But the type annotation on `map` says it should be:
Identity a -> Identity b
Thanks for reporting this! To set expectations:
- Issues are reviewed in batches, so it can take some time to get a response.
- Ask questions in a community forum. You will get an answer quicker that way!
- If you experience something similar, open a new issue. We like duplicates.
Finally, please be patient with the core team. They are trying their best with limited resources.