[commit: ghc] master: Do type-class defaulting even if there are insoluble constraints (ba2e201)

git at git.haskell.org git at git.haskell.org
Mon Apr 28 10:00:18 UTC 2014


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

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

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

commit ba2e20149e2addaccf5ce3122d3a6e93da696a0a
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Apr 25 00:04:45 2014 +0100

    Do type-class defaulting even if there are insoluble constraints
    
    The argument in Trac #9033 is very compelling: we should not report 20
    errors, fix one, and have the other 19 disappear.  They were spurious
    in the first place.
    
    The fix was easy; do type-class defaulting uncondionally, rather than
    only if there are no insoluble constraints.
    
    See Note [When to do type-class defaulting] in TcSimplify.
    
    Error messages generally improve, especially tc211 which actually
    had an example of precisely this phenomenon.


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

ba2e20149e2addaccf5ce3122d3a6e93da696a0a
 compiler/typecheck/TcSimplify.lhs                  |   34 +++++++++--
 .../tests/indexed-types/should_fail/T5934.stderr   |    8 +--
 .../tests/typecheck/should_compile/tc211.stderr    |   63 +-------------------
 testsuite/tests/typecheck/should_fail/T8603.stderr |    8 +--
 testsuite/tests/typecheck/should_fail/T9033.hs     |    7 +++
 testsuite/tests/typecheck/should_fail/T9033.stderr |    5 ++
 testsuite/tests/typecheck/should_fail/all.T        |    1 +
 testsuite/tests/typecheck/should_fail/mc24.stderr  |    4 +-
 .../tests/typecheck/should_fail/tcfail004.stderr   |    6 +-
 .../tests/typecheck/should_fail/tcfail005.stderr   |    3 +-
 .../tests/typecheck/should_fail/tcfail140.stderr   |    4 +-
 .../tests/typecheck/should_fail/tcfail189.stderr   |    4 +-
 .../tests/typecheck/should_fail/tcfail206.stderr   |    9 +--
 13 files changed, 70 insertions(+), 86 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 ba2e20149e2addaccf5ce3122d3a6e93da696a0a


More information about the ghc-commits mailing list