Stop marking soluble ~R# constraints as insoluble
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 23 Jul 2018 14:33:13 +0000 (15:33 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 23 Jul 2018 14:53:34 +0000 (15:53 +0100)
commitf0d27f515ffbc476144d1d1dd1a71bf9fa93c94b
treea140a332e05bdf15a7ad1bd17330f90c2e6e3599
parentaf624071fa063158d6e963e171280676f9c0a0b0
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.
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