GHC forbids kind signatures in data family instances
If I say
class C (a :: k)
instance (C :: Type -> Constraint) a
GHC is happy. Note that this is actually useful to do.
But if I say
data family D (a :: k)
data instance (D :: Type -> Type) a
GHC is unhappy:
Malformed head of type or class declaration: (D :: Type -> Type) a
Fixing this will require a change to the FamEqn
type, which doesn't have enough flexibility to deal with a kind signature there.
Trac metadata
Trac field | Value |
---|---|
Version | 8.6.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |