[commit: ghc] wip/rae: Slightly better `Coercible` errors. (a8a5d0d)
git at git.haskell.org
git at git.haskell.org
Sun Sep 20 21:46:51 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/rae
Link : http://ghc.haskell.org/trac/ghc/changeset/a8a5d0d80e6bca3c675aa59419fa2b78404967e5/ghc
>---------------------------------------------------------------
commit a8a5d0d80e6bca3c675aa59419fa2b78404967e5
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}
>---------------------------------------------------------------
a8a5d0d80e6bca3c675aa59419fa2b78404967e5
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 a8a5d0d80e6bca3c675aa59419fa2b78404967e5
More information about the ghc-commits
mailing list