[commit: ghc] master: Fix lexically-scoped type variables (3b0e755)

git at git.haskell.org git at git.haskell.org
Thu Jun 29 14:31:11 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3b0e7555fafe73b157a96ca48d8ddc04ad81b231/ghc

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

commit 3b0e7555fafe73b157a96ca48d8ddc04ad81b231
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Jun 29 15:26:54 2017 +0100

    Fix lexically-scoped type variables
    
    Trac #13881 showed that our handling of lexically scoped type
    variables was way off when we bring into scope a name 'y' for
    a pre-existing type variable 'a', perhaps with an entirely
    different name.
    
    This patch fixes it; see TcHsType
      Note [Pattern signature binders]


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

3b0e7555fafe73b157a96ca48d8ddc04ad81b231
 compiler/typecheck/TcHsType.hs                     | 80 +++++++++++++++-------
 compiler/typecheck/TcPat.hs                        |  4 +-
 compiler/typecheck/TcRules.hs                      |  4 +-
 testsuite/tests/typecheck/should_compile/T13881.hs | 17 +++++
 testsuite/tests/typecheck/should_compile/all.T     |  1 +
 5 files changed, 78 insertions(+), 28 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 3b0e7555fafe73b157a96ca48d8ddc04ad81b231


More information about the ghc-commits mailing list