[commit: ghc] ghc-8.2: Do not discard insolubles in implications (a0558a5)

git at git.haskell.org git at git.haskell.org
Fri Aug 25 19:58:42 UTC 2017


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

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/a0558a5af9bdba208b629d04d729849166f565fd/ghc

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

commit a0558a5af9bdba208b629d04d729849166f565fd
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Jul 27 14:52:38 2017 +0100

    Do not discard insolubles in implications
    
    Trac #14000 showed up two errors
    
    * In TcRnTypes.dropInsolubles we dropped all implications, which
      might contain the very insolubles we wanted to keep.  This was
      an outright error, and is why the out-of-scope error was actually
      lost altogether in Trac #14000
    
    * In TcSimplify.simplifyInfer, if there are definite (insoluble)
      errors, it's better to suppress the following ambiguity test,
      because the type may be bogus anyway.  See TcSimplify
      Note [Quantification with errors].  This fix seems a bit clunky,
      but it'll do for now.
    
    (cherry picked from commit 452755de717fad5d8fbfc6330cb42a3335c8912d)


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

a0558a5af9bdba208b629d04d729849166f565fd
 compiler/typecheck/TcBinds.hs                      |  22 ++--
 compiler/typecheck/TcExpr.hs                       |   2 +-
 compiler/typecheck/TcPatSyn.hs                     |   4 +-
 compiler/typecheck/TcRnDriver.hs                   |   6 +-
 compiler/typecheck/TcRnTypes.hs                    |   8 +-
 compiler/typecheck/TcSimplify.hs                   | 124 ++++++++++++++-------
 testsuite/tests/parser/should_fail/T7848.hs        |   2 +-
 testsuite/tests/parser/should_fail/T7848.stderr    |  13 +--
 testsuite/tests/th/T5358.stderr                    |  20 ++++
 testsuite/tests/typecheck/should_fail/T14000.hs    |   8 ++
 .../tests/typecheck/should_fail/T14000.stderr      |   2 +
 testsuite/tests/typecheck/should_fail/T8142.stderr |  26 +++--
 testsuite/tests/typecheck/should_fail/all.T        |   1 +
 13 files changed, 161 insertions(+), 77 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 a0558a5af9bdba208b629d04d729849166f565fd


More information about the ghc-commits mailing list