Fix #11473.
authorRichard Eisenberg <eir@cis.upenn.edu>
Tue, 15 Mar 2016 18:27:22 +0000 (14:27 -0400)
committerRichard Eisenberg <eir@cis.upenn.edu>
Wed, 16 Mar 2016 01:19:20 +0000 (21:19 -0400)
commitaade111248dce0834ed83dc4f18c234967b32024
tree6067058be2f2d181d85b6eab2574438f31998559
parent1eefedf7371778d1721d9af9247c2eff12ae7417
Fix #11473.

I've added a check in the zonker for representation polymorphism.
I don't like having this be in the zonker, but I don't know where
else to put it. It can't go in TcValidity, because a clever enough
user could convince the solver to do bogus representation polymorphism
even though there's nothing obviously wrong in what they wrote.
Note that TcValidity doesn't run over *expressions*, which is where
this problem arises.

In any case, the check is simple and it works.

test case: dependent/should_fail/T11473
compiler/typecheck/TcHsSyn.hs
testsuite/tests/dependent/should_fail/T11473.hs [new file with mode: 0644]
testsuite/tests/dependent/should_fail/T11473.stderr [new file with mode: 0644]
testsuite/tests/dependent/should_fail/all.T