Fix scoping of pattern-synonym existentials
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 18 Dec 2017 12:03:33 +0000 (12:03 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 18 Dec 2017 15:47:19 +0000 (15:47 +0000)
commitf1fe5b4adf6a4094ecc600a28f64f7628903d017
tree078df33932b6422ce520aee82c0d153fd4135a09
parent1e64fc81295ac27c5e662576da3afacd42186a13
Fix scoping of pattern-synonym existentials

This patch fixes Trac #14998, where we eventually decided that
the existential type variables of the signature of a pattern
synonym should not scope over the pattern synonym.

See Note [Pattern synonym existentials do not scope] in TcPatSyn.
14 files changed:
compiler/basicTypes/PatSyn.hs
compiler/typecheck/TcHsType.hs
compiler/typecheck/TcPatSyn.hs
compiler/typecheck/TcRnTypes.hs
compiler/typecheck/TcSigs.hs
docs/users_guide/glasgow_exts.rst
testsuite/tests/patsyn/should_fail/T11265.stderr
testsuite/tests/patsyn/should_fail/T14498.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/T14498.stderr [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/T9161-1.stderr
testsuite/tests/patsyn/should_fail/T9161-2.stderr
testsuite/tests/patsyn/should_fail/all.T
testsuite/tests/polykinds/T5716.stderr
testsuite/tests/polykinds/T7433.stderr