Higher-rank kinds lead to substitution assertion failure
Summary
In a DEBUG
compiler, I see an assertion failure in substitution while abusing GHC.
Steps to reproduce
Compile this on a DEBUG
compiler:
data Q :: forall d. Type
data HR :: (forall d. Type) -> Type
x :: HR Q
x = undefined
Expected behavior
Type error: the inferred kind of HR
quantifies the kind of d
outside the higher-rank argument.
Environment
- GHC version used: HEAD