class C a b where
type FC a (b :: *) = r | r -> b
type instance FC a b = b
instance C Char a
and GHC responds:
T6018.hs:1:1:
Type family equation violates injectivity annotation.
RHS of injective type family equation is a bare type variable
but these LHS type and kind patterns are not bare variables: ‘Char’
FC Char a -- Defined in ‘T6018’
That error location is not at all helpful. Can I report it at the instance declaration site?
I say:
and GHC responds:
That error location is not at all helpful. Can I report it at the instance declaration site?