Use partial-sig constraints as givens
authorSimon Peyton Jones <simonpj@microsoft.com>
Tue, 10 May 2016 11:48:29 +0000 (12:48 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Tue, 10 May 2016 13:25:08 +0000 (14:25 +0100)
commite24b50c3a70a247a4695a80aceba0cf351eb1e9e
tree707b551361a9e440b59d6c0d6c8f6ed92f0fce72
parente7e5939d80f05cfc52e98af50d0e0227aeee826d
Use partial-sig constraints as givens

In TcSimplify.simplifyInfer, use the context of a partial type
signature as 'givens' when simplifying the inferred constraints of the
group.  This way we get maximum benefit from them.  See
Note [Add signature contexts as givens].

This (finally) fixes test EqualityConstraints in Trac #9478.

And it's a nice tidy-up.
compiler/typecheck/TcBinds.hs
compiler/typecheck/TcSimplify.hs
compiler/typecheck/TcType.hs
testsuite/tests/partial-sigs/should_compile/SuperCls.hs [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/SuperCls.stderr [new file with mode: 0644]
testsuite/tests/partial-sigs/should_compile/WarningWildcardInstantiations.stderr
testsuite/tests/partial-sigs/should_compile/all.T
testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr