[commit: ghc] master: Fix constraint solving for forall-types (fae672f)
git at git.haskell.org
git at git.haskell.org
Wed Jun 28 13:09:46 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/fae672f647fe00c303d8fb56971563c1a76ad04e/ghc
>---------------------------------------------------------------
commit fae672f647fe00c303d8fb56971563c1a76ad04e
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Jun 28 12:38:59 2017 +0100
Fix constraint solving for forall-types
Trac #13879 showed that when we were trying to solve
(forall z1 (y1::z1). ty1) ~ (forall z2 (y2:z2). ty2)
we'd end up spitting out z1~z2 with no binding site for them.
Those kind equalities need to be inside the implication.
I ended up re-factoring the code for solving forall-equalities.
It's quite nice now.
>---------------------------------------------------------------
fae672f647fe00c303d8fb56971563c1a76ad04e
compiler/typecheck/TcCanonical.hs | 95 ++++++++++++++++-----
compiler/typecheck/TcSMonad.hs | 98 +++++++++++-----------
testsuite/tests/typecheck/should_compile/T13879.hs | 29 +++++++
testsuite/tests/typecheck/should_compile/all.T | 1 +
.../tests/typecheck/should_fail/tcfail174.stderr | 2 +-
5 files changed, 152 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 fae672f647fe00c303d8fb56971563c1a76ad04e
More information about the ghc-commits
mailing list