[commit: ghc] master: Ensure that insolubles are fully rewritten (433b80d)

git at git.haskell.org git at git.haskell.org
Fri May 19 10:11:59 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/433b80dec1cfef787fc1327a9eada1791b11c12e/ghc

>---------------------------------------------------------------

commit 433b80dec1cfef787fc1327a9eada1791b11c12e
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri May 19 10:50:35 2017 +0100

    Ensure that insolubles are fully rewritten
    
    I was alerted to this by Trac #12468 and #11325.  We were treating
    insolubles (and "hole" constraints are treated as insoluble)
    inconsistently.  In some places we were carefully rewriting them
    e.g. Note [Make sure that insolubles are fully rewritten] in
    TcCanonical.  But in TcSimplify we weren't feeding them into
    the solver.
    
    As a result, "hole" constraints were not being rewritten, which
    some users found confusing, and I think rightly so.
    
    This patch also fixes a bug in TcSMonad.emitInsoluble, in which two
    different "hole" constriants could be treated (bogusly) as duplicates,
    thereby losing one.


>---------------------------------------------------------------

433b80dec1cfef787fc1327a9eada1791b11c12e
 compiler/typecheck/TcCanonical.hs                  |  2 +-
 compiler/typecheck/TcRnTypes.hs                    | 15 +++++----
 compiler/typecheck/TcSMonad.hs                     | 38 +++++++++++++++-------
 compiler/typecheck/TcSimplify.hs                   | 28 ++++++++++------
 testsuite/tests/gadt/T12468.hs                     |  9 +++++
 testsuite/tests/gadt/T12468.stderr                 |  6 ++++
 testsuite/tests/gadt/all.T                         |  1 +
 .../should_compile/hole_constraints.stderr         |  4 +--
 8 files changed, 73 insertions(+), 30 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 433b80dec1cfef787fc1327a9eada1791b11c12e


More information about the ghc-commits mailing list