[commit: ghc] ghc-8.2: Fix error-message suppress on given equalities (c9935f1)
git at git.haskell.org
git at git.haskell.org
Wed Mar 29 23:41:48 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.2
Link : http://ghc.haskell.org/trac/ghc/changeset/c9935f1578369a8aa8243081873b706f7ff1b336/ghc
>---------------------------------------------------------------
commit c9935f1578369a8aa8243081873b706f7ff1b336
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.
(cherry picked from commit e0ad55f894a8d85dcc099c33c63cfe3d4515d464)
>---------------------------------------------------------------
c9935f1578369a8aa8243081873b706f7ff1b336
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 c9935f1578369a8aa8243081873b706f7ff1b336
More information about the ghc-commits
mailing list