Stop marking soluble ~R# constraints as insoluble
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 23 Jul 2018 14:33:13 +0000 (15:33 +0100)
committerBen Gamari <ben@smart-cactus.org>
Tue, 31 Jul 2018 19:53:19 +0000 (15:53 -0400)
commit09abd1c420532c4274ddaeb5dfa54d7a9123d172
tree00670e69d0b165bdd6cc3615993b94148b8cf91f
parentff839f20029b7f8742de05f7b49bf4117921db9c
Stop marking soluble ~R# constraints as insoluble

We had a constraint (a b ~R# Int), and were marking it as 'insoluble'.
That's bad; it isn't.  And it caused Trac #15431. Soultion is simple.

I did a tiny refactor on can_eq_app, so that it is used only for
nominal equalities.

(cherry picked from commit f0d27f515ffbc476144d1d1dd1a71bf9fa93c94b)
compiler/typecheck/TcCanonical.hs
testsuite/tests/typecheck/should_compile/T15431.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/T15431a.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T