Complete the fix for #13441 (pattern synonyms)
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 28 Mar 2017 07:23:44 +0000 (08:23 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 28 Mar 2017 07:23:44 +0000 (08:23 +0100)
commitb5c81203d047293f54c4e89ac70d505197968cb3
tree62e019b68099dc22421bf3c327e4c92be5b3a270
parentcea7141851ce653cb20207da3591d09e73fa396d
Complete the fix for #13441 (pattern synonyms)

Do not attempt to typecheck both directions of an
implicitly-bidirectional pattern synonym simultanously,
as we were before.  Instead, the builder is typechecked
when we typecheck the code for the builder, which was
of course happening already, even in both bidirectional
cases.

See Note [Checking against a pattern signature], under
"Existential type variables".
compiler/typecheck/TcPatSyn.hs
testsuite/tests/patsyn/should_compile/T13441.hs
testsuite/tests/patsyn/should_compile/T13441a.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/T13441b.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/T13441b.stderr [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/all.T