Expand type synonyms when Linting a forall
Trac #14939 showed a type like type Alg cls ob = ob f :: forall (cls :: * -> Constraint) (b :: Alg cls *). b where the kind of the forall looks like (Alg cls *), with a free cls. This tripped up Core Lint. I fixed this by making Core Lint a bit more forgiving, expanding type synonyms if necessary. I'm worried that this might not be the whole story; notably typeKind looks suspect. But it certainly fixes this problem.
Showing
- compiler/coreSyn/CoreLint.hs 30 additions, 7 deletionscompiler/coreSyn/CoreLint.hs
- compiler/types/Type.hs 3 additions, 1 deletioncompiler/types/Type.hs
- testsuite/tests/polykinds/T14939.hs 19 additions, 0 deletionstestsuite/tests/polykinds/T14939.hs
- testsuite/tests/polykinds/all.T 1 addition, 0 deletionstestsuite/tests/polykinds/all.T
Loading
Please register or sign in to comment