GHC-83865 is (too?) generic of an error code
Motivation
GHC-83865, "TypeEqMismatch", seems to cover many errors that could perhaps be given more specific, individual codes.
It covers situations where:
- A type is expected, but a kind is given ("Expected a type, but ‘Maybe’ has kind ‘* -> *’")
- Type
a
is expected, but typeb
is given ("Couldn't match expected type ‘Int’ with actual type ‘Char’") - Levity mismatch ("Couldn't match a lifted type with an unlifted type")
- Kind
a
is expected, but kindb
is given ("Expected kind ‘* -> k3’, but ‘Type’ has kind ‘*’") - SimplifiedSubsumption breaks code ("Couldn't match type ‘()’ with ‘forall t. t’")
- A special case of (2) that adds the message, "The function ‘t2’ is applied to one value argument, but its type ‘Int’ has none"
I can recognize how these are all examples of "the same thing", but in practice they cover a lot of ground and would make an entry in https://errors.haskell.org pretty unwieldy.
Proposal
I don't have a concrete proposal, as someone unfamiliar with the specifics of errors. I am hoping someone can help choose between these outcomes:
- Bite the bullet and write a dissertation for the errors.haskell.org entry
- Create new codes to represent the most pertinent distinct situations
- Somehow improve the message when SimplifiedSubsumption is suspected