[commit: ghc] wip/rae: Slightly better `Coercible` errors. (2f9809e)

git at git.haskell.org git at git.haskell.org
Mon Sep 21 14:52:20 UTC 2015


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

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/2f9809efdbc11fee445dbe3d5c555433ec3c5e6a/ghc

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

commit 2f9809efdbc11fee445dbe3d5c555433ec3c5e6a
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Sun Sep 20 17:39:17 2015 -0400

    Slightly better `Coercible` errors.
    
    This makes two real changes:
     - Equalities like (a ~R [a]) really *are* insoluble. Previously,
       GHC refused to give up when an occurs check bit on a representational
       equality. But for datatypes, it really should bail.
    
     - Now, GHC will sometimes report an occurs check error (in cases above)
       for representational equalities. Previously, it never did.
    
    This "fixes" #10715, where by "fix", I mean clarifies the error message.
    It's unclear how to do more to fix that ticket.
    
    Test cases: typecheck/should_fail/T10715{,b}


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

2f9809efdbc11fee445dbe3d5c555433ec3c5e6a
 compiler/typecheck/TcCanonical.hs                  | 29 ++++++++++++++++++----
 compiler/typecheck/TcErrors.hs                     |  8 ++++--
 compiler/typecheck/TcType.hs                       | 21 +++++++++++++++-
 testsuite/tests/typecheck/should_fail/T10715.hs    | 10 ++++++++
 .../tests/typecheck/should_fail/T10715.stderr      | 15 +++++++++++
 testsuite/tests/typecheck/should_fail/T10715b.hs   |  7 ++++++
 .../tests/typecheck/should_fail/T10715b.stderr     |  8 ++++++
 testsuite/tests/typecheck/should_fail/all.T        |  2 ++
 8 files changed, 92 insertions(+), 8 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 2f9809efdbc11fee445dbe3d5c555433ec3c5e6a


More information about the ghc-commits mailing list