Fix lexically-scoped type variables
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 29 Jun 2017 14:26:54 +0000 (15:26 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 29 Jun 2017 14:30:53 +0000 (15:30 +0100)
commit3b0e7555fafe73b157a96ca48d8ddc04ad81b231
treeea37a910eade51e2346a2e9d49ca8f266974fcf7
parent54ccf0c957a279c20e1a37a5a462612af8036739
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]
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcPat.hs
compiler/typecheck/TcRules.hs
testsuite/tests/typecheck/should_compile/T13881.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T