[commit: ghc] ghc-8.4: Fix a nasty bug in the pure unifier (1132ec6)
git at git.haskell.org
git at git.haskell.org
Wed Mar 28 17:43:17 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.4
Link : http://ghc.haskell.org/trac/ghc/changeset/1132ec683591eafa55e309cd01b9f4cb5524c7c5/ghc
>---------------------------------------------------------------
commit 1132ec683591eafa55e309cd01b9f4cb5524c7c5
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.
(cherry picked from commit e99fdf775540440c1c58dc5ade3c5984dc49246f)
>---------------------------------------------------------------
1132ec683591eafa55e309cd01b9f4cb5524c7c5
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 1132ec683591eafa55e309cd01b9f4cb5524c7c5
More information about the ghc-commits
mailing list