[commit: ghc] master: Fix a nasty bug in the pure unifier (e99fdf7)
git at git.haskell.org
git at git.haskell.org
Tue Feb 27 08:45:06 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/e99fdf775540440c1c58dc5ade3c5984dc49246f/ghc
>---------------------------------------------------------------
commit e99fdf775540440c1c58dc5ade3c5984dc49246f
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Mon Feb 26 17:44:55 2018 +0000
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.
>---------------------------------------------------------------
e99fdf775540440c1c58dc5ade3c5984dc49246f
compiler/types/Unify.hs | 59 ++++++++++++++++++---------------
testsuite/tests/polykinds/T14846.hs | 39 ++++++++++++++++++++++
testsuite/tests/polykinds/T14846.stderr | 43 ++++++++++++++++++++++++
testsuite/tests/polykinds/all.T | 1 +
4 files changed, 116 insertions(+), 26 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc e99fdf775540440c1c58dc5ade3c5984dc49246f
More information about the ghc-commits
mailing list