Fix instantiation of pattern synonyms
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 27 Jul 2017 13:45:54 +0000 (14:45 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 28 Jul 2017 08:31:55 +0000 (09:31 +0100)
commit6b77914cd37b697354611bcd87897885c1e5b4a6
treef52b7bd7e2cea8bf63decb5b6d943cdda1f49fdc
parent7af0b906116e13fbd90f43f2f6c6b826df2dca77
Fix instantiation of pattern synonyms

In Check.hs (pattern match ovelap checking) we to figure out the
instantiation of a pattern synonym from the type of the pattern. We
were doing this utterly wrongly.  Trac #13768 demonstrated this
bogosity.

The fix is easy; and is described in PatSyn.hs
  Note [Pattern synonym result type]
compiler/basicTypes/PatSyn.hs
compiler/deSugar/Check.hs
testsuite/tests/patsyn/should_compile/T13768.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/all.T