diff options
author | Richard Eisenberg <richard.eisenberg@tweag.io> | 2022-05-13 15:15:10 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-05-26 23:20:14 -0400 |
commit | d87530bbf497d21edb4a1dd5cb834fb42a49d1d8 (patch) | |
tree | 01b7db068762e305540cf430edb7c36b04cb8aa9 /testsuite/tests/indexed-types | |
parent | 88e586004abac9404307f6e19c86d7fd5c4ad5f1 (diff) | |
download | haskell-d87530bbf497d21edb4a1dd5cb834fb42a49d1d8.tar.gz |
Generalize breakTyVarCycle to work with TyFamLHS
The function breakTyVarCycle_maybe has been installed
in a dark corner of GHC to catch some gremlins (a.k.a.
occurs-check failures) who lurk
there. But it previously only caught gremlins of the
form (a ~ ... F a ...), where some of our intrepid users
have spawned gremlins of the form (G a ~ ... F (G a) ...).
This commit improves breakTyVarCycle_maybe (and renames
it to breakTyEqCycle_maybe) to catch the new gremlins.
Happily, the change is remarkably small.
The gory details are in Note [Type equality cycles].
Test cases: typecheck/should_compile/{T21515,T21473}.
Diffstat (limited to 'testsuite/tests/indexed-types')
-rw-r--r-- | testsuite/tests/indexed-types/should_compile/T18875.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/T18875.hs b/testsuite/tests/indexed-types/should_compile/T18875.hs index 0121f5ff12..f3874005b9 100644 --- a/testsuite/tests/indexed-types/should_compile/T18875.hs +++ b/testsuite/tests/indexed-types/should_compile/T18875.hs @@ -2,7 +2,7 @@ module T18875 where --- This exercises Note [Type variable cycles] in GHC.Tc.Solver.Canonical +-- This exercises Note [Type equality cycles] in GHC.Tc.Solver.Canonical type family G a b where G (Maybe c) d = d |