Care with occCheckExpand in kind of occurrences
Issue #18451 showed that we could get an infinite type, through over-use of occCheckExpand in the kind of an /occurrence/ of a type variable. See Note [Occurrence checking: look inside kinds] in GHC.Core.Type This patch fixes the problem by making occCheckExpand less eager to expand synonyms in kinds. It also improves pretty printing of kinds, by *not* suppressing the kind on a tyvar-binder like (a :: Const Type b) where type Const p q = p. Even though the kind of 'a' is Type, we don't want to suppress the kind ascription. Example: the error message for polykinds/T18451{a,b}. See GHC.Core.TyCo.Ppr Note [Suppressing * kinds].
parent
c1f4f81d
No related branches found
No related tags found
Pipeline #22609 failed
Stage: lint
Stage: quick-build
Stage: build
Stage: full-build
Stage: cleanup
Stage: packaging
Stage: testing
Stage: deploy
Showing
- compiler/GHC/Core/TyCo/Ppr.hs 28 additions, 5 deletionscompiler/GHC/Core/TyCo/Ppr.hs
- compiler/GHC/Core/Type.hs 77 additions, 16 deletionscompiler/GHC/Core/Type.hs
- compiler/GHC/Tc/Utils/Unify.hs 7 additions, 19 deletionscompiler/GHC/Tc/Utils/Unify.hs
- testsuite/tests/polykinds/T18451.hs 10 additions, 0 deletionstestsuite/tests/polykinds/T18451.hs
- testsuite/tests/polykinds/T18451.stderr 9 additions, 0 deletionstestsuite/tests/polykinds/T18451.stderr
- testsuite/tests/polykinds/T18451a.hs 11 additions, 0 deletionstestsuite/tests/polykinds/T18451a.hs
- testsuite/tests/polykinds/T18451a.stderr 7 additions, 0 deletionstestsuite/tests/polykinds/T18451a.stderr
- testsuite/tests/polykinds/T18451b.hs 11 additions, 0 deletionstestsuite/tests/polykinds/T18451b.hs
- testsuite/tests/polykinds/T18451b.stderr 7 additions, 0 deletionstestsuite/tests/polykinds/T18451b.stderr
- testsuite/tests/polykinds/all.T 3 additions, 0 deletionstestsuite/tests/polykinds/all.T
Loading