[commit: ghc] wip/rae: Track visibility in TypeEqOrigin (cbf1af5)
git at git.haskell.org
git at git.haskell.org
Tue Jul 18 18:36:56 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/rae
Link : http://ghc.haskell.org/trac/ghc/changeset/cbf1af59f8c9884967cc5b33b21a327780f32427/ghc
>---------------------------------------------------------------
commit cbf1af59f8c9884967cc5b33b21a327780f32427
Author: Richard Eisenberg <rae at cs.brynmawr.edu>
Date: Tue Jul 18 14:30:40 2017 -0400
Track visibility in TypeEqOrigin
A type equality error can arise from a mismatch between
*invisible* arguments just as easily as from visible arguments.
But we should really prefer printing out errors from visible
arguments over invisible ones. Suppose we have a mismatch between
`Proxy Int` and `Proxy Maybe`. Would you rather get an error
between `Int` and `Maybe`? Or between `*` and `* -> *`? I thought
so, too.
There is a fair amount of plumbing with this one, but I think
it's worth it.
>---------------------------------------------------------------
cbf1af59f8c9884967cc5b33b21a327780f32427
compiler/typecheck/Inst.hs | 3 +-
compiler/typecheck/TcCanonical.hs | 18 +++--
compiler/typecheck/TcErrors.hs | 29 ++++----
compiler/typecheck/TcHsType.hs | 5 +-
compiler/typecheck/TcRnTypes.hs | 30 ++++++++-
compiler/typecheck/TcType.hs | 38 ++++++++++-
compiler/typecheck/TcUnify.hs | 78 +++++++++++++---------
testsuite/tests/polykinds/KindVType.stderr | 2 +-
.../tests/typecheck/should_fail/T12373.stderr | 3 +
.../tests/typecheck/should_fail/T13530.stderr | 3 +
testsuite/tests/typecheck/should_fail/T8603.stderr | 7 +-
11 files changed, 150 insertions(+), 66 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 cbf1af59f8c9884967cc5b33b21a327780f32427
More information about the ghc-commits
mailing list