Fix constraint simplification in rules
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 10 Mar 2017 12:09:52 +0000 (12:09 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 10 Mar 2017 16:05:24 +0000 (16:05 +0000)
commitaf6ed4a62c77e57f544243aa72bba51a1cff6808
treefab1e24b5633bfab4c629eac03ab32a348e30a59
parent48d1866e9051e52b80c9c88547bd66d66483f1d5
Fix constraint simplification in rules

Trac #13381 showed that we were losing track of a wanted constraint
when simplifying the LHS constraints for a RULE.

This patch fixes it, makes the code a bit simpler, and better
documented.
compiler/typecheck/TcRules.hs
testsuite/tests/typecheck/should_compile/T13381.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/T13381.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T