Fix a nasty bug in the pure unifier
The pure unifier was building an infinite type, through a defective occurs check. So GHC went into an infinite loop. Reason: we were neglecting the 'kco' part of the type, which 'unify_ty' maintains. Yikes. The fix is easy. I refactored a bit to make it harder to go wrong in future. (cherry picked from commit e99fdf77)
Showing
- compiler/types/Unify.hs 33 additions, 26 deletionscompiler/types/Unify.hs
- testsuite/tests/polykinds/T14846.hs 39 additions, 0 deletionstestsuite/tests/polykinds/T14846.hs
- testsuite/tests/polykinds/T14846.stderr 43 additions, 0 deletionstestsuite/tests/polykinds/T14846.stderr
- testsuite/tests/polykinds/all.T 1 addition, 0 deletionstestsuite/tests/polykinds/all.T
Loading
Please register or sign in to comment