[commit: ghc] ghc-7.10: Slightly better `Coercible` errors. (00a7af6)

git at git.haskell.org git at git.haskell.org
Tue Sep 29 16:09:48 UTC 2015


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

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/00a7af69f8ab22b50e3430f47b6c7a12b058e7bc/ghc

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

commit 00a7af69f8ab22b50e3430f47b6c7a12b058e7bc
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}


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

00a7af69f8ab22b50e3430f47b6c7a12b058e7bc
 compiler/typecheck/TcCanonical.hs                  | 29 ++++++++++++++++++----
 compiler/typecheck/TcErrors.hs                     | 14 +++++++----
 compiler/typecheck/TcType.hs                       | 19 ++++++++++++++
 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        |  1 +
 8 files changed, 93 insertions(+), 10 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 00a7af69f8ab22b50e3430f47b6c7a12b058e7bc


More information about the ghc-commits mailing list