[commit: ghc] ghc-8.2: Fix lexically-scoped type variables (2755f23)

git at git.haskell.org git at git.haskell.org
Thu Jun 29 23:31:41 UTC 2017


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

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/2755f23919f7429668a933374f2a4ca14a9966b6/ghc

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

commit 2755f23919f7429668a933374f2a4ca14a9966b6
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]
    
    (cherry picked from commit 3b0e7555fafe73b157a96ca48d8ddc04ad81b231)


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

2755f23919f7429668a933374f2a4ca14a9966b6
 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 2755f23919f7429668a933374f2a4ca14a9966b6


More information about the ghc-commits mailing list