Fix another obscure pattern-synonym crash
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 5 Jan 2018 09:12:49 +0000 (09:12 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 5 Jan 2018 09:12:49 +0000 (09:12 +0000)
commit40cbab9afe52fbc780310e880912b56370065a62
treef042f883561f805ec8b47e1df5f1976f517cb8ce
parentc73271163a3a025f0d1d49bcd6fa7763892dfb48
Fix another obscure pattern-synonym crash

This one, discovered by Iceland Jack (Trac #14507), shows
that a pattern-bound coercion can show up in the argument
type(s) of the matcher of a pattern synonym.

The error message isn't great, but at least we now rightly
reject the program.
compiler/typecheck/TcPatSyn.hs
testsuite/tests/patsyn/should_fail/T14507.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/T14507.stderr [new file with mode: 0644]
testsuite/tests/patsyn/should_fail/all.T