[commit: ghc] master: Better solving for representational equalities (5a66d57)
git at git.haskell.org
git at git.haskell.org
Wed Oct 18 08:37:54 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/5a66d574890ed09859ca912c9e0969dba72f4a23/ghc
>---------------------------------------------------------------
commit 5a66d574890ed09859ca912c9e0969dba72f4a23
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Tue Oct 17 16:32:25 2017 +0100
Better solving for representational equalities
This patch adds a bit of extra solving power for representational
equality constraints to fix Trac #14333
The main changes:
* Fix a buglet in TcType.isInsolubleOccursCheck which wrongly
reported a definite occurs-check error for (a ~R# b a)
* Get rid of TcSMonad.emitInsolubles. It had an ad-hoc duplicate-removal
piece that is better handled in interactIrred, now that insolubles
are Irreds.
We need a little care to keep inert_count (which does not include
insolubles) accurate.
* Refactor TcInteract.solveOneFromTheOther, to return a much simpler
type. It was just over-complicated before.
* Make TcInteract.interactIrred look for constraints that match
either way around, in TcInteract.findMatchingIrreds
This wasn't hard and it cleaned up quite a bit of code.
>---------------------------------------------------------------
5a66d574890ed09859ca912c9e0969dba72f4a23
compiler/typecheck/TcCanonical.hs | 14 +-
compiler/typecheck/TcInteract.hs | 257 ++++++++++++++-------
compiler/typecheck/TcSMonad.hs | 91 ++------
compiler/typecheck/TcType.hs | 16 +-
testsuite/tests/typecheck/should_compile/T14333.hs | 20 ++
testsuite/tests/typecheck/should_compile/all.T | 1 +
.../typecheck/should_fail/FrozenErrorTests.hs | 0
7 files changed, 236 insertions(+), 163 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 5a66d574890ed09859ca912c9e0969dba72f4a23
More information about the ghc-commits
mailing list