[commit: ghc] wip/rae: Track visibility in TypeEqOrigin (6b78773)

git at git.haskell.org git at git.haskell.org
Wed Jul 26 14:10:45 UTC 2017


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

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/6b78773929bbbed5a021b67bcdaef23f545c07eb/ghc

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

commit 6b78773929bbbed5a021b67bcdaef23f545c07eb
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.


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

6b78773929bbbed5a021b67bcdaef23f545c07eb
 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 6b78773929bbbed5a021b67bcdaef23f545c07eb


More information about the ghc-commits mailing list