Fix DeriveAnyClass (again)
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 21 Feb 2017 10:27:41 +0000 (10:27 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 21 Feb 2017 10:30:17 +0000 (10:30 +0000)
commitfd841f877ab7a991f667a50b401404927f6f599c
tree04ab2246376b99915716ec1ffb4faedb63f69931
parent59026b3be1ba9afed161e1a4cfcd98d3ee021afd
Fix DeriveAnyClass (again)

This patch fixes Trac #13272.  The general approach was fine, but
we were simply not generating the correct implication constraint
(in particular generating fresh unification variables).  I added
a lot more commentary to Note [Gathering and simplifying
constraints for DeriveAnyClass]

I'm still not very happy with the overall architecture.  It feels
more complicate than it should.
compiler/typecheck/TcDerivInfer.hs
testsuite/tests/deriving/should_compile/T13272.hs [new file with mode: 0644]
testsuite/tests/deriving/should_compile/T13272a.hs [new file with mode: 0644]
testsuite/tests/deriving/should_compile/all.T