[commit: ghc] ghc-8.0: Fix a nasty superclass expansion bug (aa830b1)
git at git.haskell.org
git at git.haskell.org
Thu Feb 11 15:30:02 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/aa830b1e709bb65353045e27f163ace4752da265/ghc
>---------------------------------------------------------------
commit aa830b1e709bb65353045e27f163ace4752da265
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Mon Feb 8 14:41:08 2016 +0000
Fix a nasty superclass expansion bug
This patch fixes Trac #11523.
* The basic problem was that TcRnTypes.superClassesMightHelp was
returning True of a Derived constraint, and that led to us
expanding Given superclasses, which produced the same Derived
constraint again, and so on infinitely. We really want to do
this only if there are unsolve /Wanted/ contraints!
* On the way I made TcSMonad.getUnsolvedInerts a bit more
discriminating about which Derived equalities it returns;
see Note [Unsolved Derived equalities] in TcSMonad
* Lots of new comments in TcSMonad.
(cherry picked from commit 43e02d1270701a1043be67f078cf2b1a85047feb)
>---------------------------------------------------------------
aa830b1e709bb65353045e27f163ace4752da265
compiler/typecheck/TcRnTypes.hs | 58 +++++++-----
compiler/typecheck/TcSMonad.hs | 102 +++++++++++++--------
testsuite/tests/polykinds/T11523.hs | 89 ++++++++++++++++++
testsuite/tests/polykinds/all.T | 1 +
testsuite/tests/typecheck/should_fail/T5853.stderr | 22 ++---
5 files changed, 199 insertions(+), 73 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 aa830b1e709bb65353045e27f163ace4752da265
More information about the ghc-commits
mailing list