[commit: ghc] ghc-8.2: Fix constraint solving for forall-types (7d9ca50)
git at git.haskell.org
git at git.haskell.org
Thu Jun 29 23:31:37 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.2
Link : http://ghc.haskell.org/trac/ghc/changeset/7d9ca50e184f2bc5da531646673fa7eecfd39862/ghc
>---------------------------------------------------------------
commit 7d9ca50e184f2bc5da531646673fa7eecfd39862
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.
(cherry picked from commit fae672f647fe00c303d8fb56971563c1a76ad04e)
>---------------------------------------------------------------
7d9ca50e184f2bc5da531646673fa7eecfd39862
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 7d9ca50e184f2bc5da531646673fa7eecfd39862
More information about the ghc-commits
mailing list