[commit: ghc] master: Fix error-message suppress on given equalities (e0ad55f)
git at git.haskell.org
git at git.haskell.org
Mon Mar 27 15:31:56 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/e0ad55f894a8d85dcc099c33c63cfe3d4515d464/ghc
>---------------------------------------------------------------
commit e0ad55f894a8d85dcc099c33c63cfe3d4515d464
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Mon Mar 27 10:32:08 2017 +0100
Fix error-message suppress on given equalities
I'd got the logic slightly wrong when reporting type errors
for insoluble 'given' equalities. We suppress insoluble givens
under some circumstances (see Note [Given errors]), but we then
suppressed subsequent 'wanted' errors because the (suppressed)
'given' error "won". Result: no errors at all :-(.
This patch fixes it and
- Renames TcType.isTyVarUnderDatatype to the more
perspicuous TcType.isInsolubleOccursCheck
In doing this I realise that I don't understand why we need
to keep the insolubles partitioned out separately at all...
but that is for another day.
>---------------------------------------------------------------
e0ad55f894a8d85dcc099c33c63cfe3d4515d464
compiler/typecheck/TcCanonical.hs | 9 +--
compiler/typecheck/TcErrors.hs | 77 ++++++++++++++--------
compiler/typecheck/TcType.hs | 45 ++++++++-----
testsuite/tests/ghci/scripts/Defer02.stderr | 5 ++
.../tests/indexed-types/should_fail/T2627b.stderr | 10 ++-
.../tests/indexed-types/should_fail/T5934.stderr | 18 ++++-
.../tests/indexed-types/should_fail/T6123.stderr | 3 +-
.../tests/indexed-types/should_fail/T7354.stderr | 5 +-
.../tests/typecheck/should_compile/T12427a.stderr | 21 +-----
.../tests/typecheck/should_fail/T12589.stderr | 9 +++
testsuite/tests/typecheck/should_fail/T13446.hs | 46 +++++++++++++
.../tests/typecheck/should_fail/T13446.stderr | 10 +++
testsuite/tests/typecheck/should_fail/all.T | 1 +
13 files changed, 184 insertions(+), 75 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 e0ad55f894a8d85dcc099c33c63cfe3d4515d464
More information about the ghc-commits
mailing list