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

git at git.haskell.org git at git.haskell.org
Mon Sep 21 01:50:46 UTC 2015


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

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/7669c8ab2d3c2c02c1eb88b88dd6307b9ebaddc3/ghc

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

commit 7669c8ab2d3c2c02c1eb88b88dd6307b9ebaddc3
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}


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

7669c8ab2d3c2c02c1eb88b88dd6307b9ebaddc3
 compiler/typecheck/TcCanonical.hs                  | 27 ++++++++++++++++++----
 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, 90 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 7669c8ab2d3c2c02c1eb88b88dd6307b9ebaddc3


More information about the ghc-commits mailing list