be a bit more helpful when it comes to distinguishing different type-level constructs
Summary
Often I get type errors like this:
"No instance Foo (Bar Baz)" or "No instance Foo (Bar Baz [..] a0)"; this happens because type families didn't reduce; not because there's really not an instance; I would like to have the following aid of the type checker:
- if there's a some type family, that didn't reduce, leave an NB, that
Bar
is indeed a type family and that it didn't reduce or, even better, tell the user- how they instantiated the type family
- that there is no equation for this instantiation
This is helpful for two reasons:
- identify what kind of type level constructs you're using; in more involved projects, you sometimes have a hard time knowing what is a type synonym/ type family/ class/ data type
- identify when there might be an instance but your instantiation is wrong/ you're missing an instance/ your types didn't monomorphize enough