[commit: ghc] master: Do not discard insoluble Derived constraints (20632d3)

git at git.haskell.org git at git.haskell.org
Fri Sep 26 11:34:57 UTC 2014


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

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

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

commit 20632d37b5bcb68bb0ca34238f1ed49c7be3a8f7
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Sep 26 10:44:46 2014 +0100

    Do not discard insoluble Derived constraints
    
    This is preparing for a fix to Trac #9612. The idea is that insoluble
    constraints are nice solid errors that we should not discard before
    we have a chance to report them.  So TcRnTypes.dropDerivedWC now
    keeps insoluble Derived constrains, and instead TcSimplify.solve_wanteds
    filters them out
    
    We get somewhat better error message for kind-equality failures too.
    
    A slight downside is that to avoid *duplicate* kind-equality failures
    when we float a kind-incompatible equality (e.g.  alpha:* ~ Int#),
    I've disabled constraint-floating when there are insolubles.  But that
    in turn makes a handful of error messages a little less informative;
    good examples are mc21, mc22, mc25.  But I am re-jigging the
    constraint floating machinery in another branch, which will make this
    go back to the way it was before.


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

20632d37b5bcb68bb0ca34238f1ed49c7be3a8f7
 compiler/typecheck/TcRnTypes.lhs                   | 44 +++++++++++-----------
 compiler/typecheck/TcSimplify.lhs                  | 18 ++++++++-
 .../tests/indexed-types/should_fail/T3330c.stderr  | 22 ++---------
 testsuite/tests/typecheck/should_fail/T3950.stderr |  5 ++-
 testsuite/tests/typecheck/should_fail/T5570.stderr |  3 +-
 testsuite/tests/typecheck/should_fail/T7368.stderr |  3 +-
 .../tests/typecheck/should_fail/T7368a.stderr      |  7 ++--
 testsuite/tests/typecheck/should_fail/T8262.stderr |  3 +-
 testsuite/tests/typecheck/should_fail/T8603.stderr |  5 ++-
 testsuite/tests/typecheck/should_fail/mc21.stderr  |  4 +-
 testsuite/tests/typecheck/should_fail/mc22.stderr  | 17 +++++----
 testsuite/tests/typecheck/should_fail/mc25.stderr  | 14 +++----
 .../tests/typecheck/should_fail/tcfail090.stderr   |  3 +-
 .../tests/typecheck/should_fail/tcfail122.stderr   |  3 +-
 .../tests/typecheck/should_fail/tcfail123.stderr   |  3 +-
 .../tests/typecheck/should_fail/tcfail159.stderr   |  3 +-
 .../tests/typecheck/should_fail/tcfail200.stderr   |  3 +-
 17 files changed, 87 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 20632d37b5bcb68bb0ca34238f1ed49c7be3a8f7


More information about the ghc-commits mailing list