[commit: ghc] wip/rae: Track visibility in TypeEqOrigin (4931f56)

git at git.haskell.org git at git.haskell.org
Wed Jul 19 12:03:59 UTC 2017


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

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/4931f56b67f8abed01ab741d125d01c7012122c1/ghc

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

commit 4931f56b67f8abed01ab741d125d01c7012122c1
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.


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

4931f56b67f8abed01ab741d125d01c7012122c1
 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 4931f56b67f8abed01ab741d125d01c7012122c1


More information about the ghc-commits mailing list