Remove wc_insol from WantedConstraints
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 9 Oct 2017 12:16:59 +0000 (13:16 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 11 Oct 2017 11:33:29 +0000 (12:33 +0100)
commitf20cf982f126aea968ed6a482551550ffb6650cf
treecba52af91ab61484d29067e0c44b7d5cc24d57d5
parent3e44562ae18526ae0df6370078321dd19b00616f
Remove wc_insol from WantedConstraints

This patch is a pure refactoring, which I've wanted to do for
some time.  The main payload is

* Remove the wc_insol field from WantedConstraints;
  instead put all the insolubles in wc_simple

* Remove inert_insols from InertCans
  Instead put all the insolubles in inert_irreds

* Add a cc_insol flag to CIrredCan, to record that
  the constraint is definitely insoluble

Reasons

* Quite a bit of code gets slightly simpler
* Fewer concepts to keep separate
* Insolubles don't happen at all in production code that is
  just being recompiled, so previously there was a lot of
  moving-about of empty sets

A couple of error messages acutally improved.
19 files changed:
compiler/typecheck/TcCanonical.hs
compiler/typecheck/TcErrors.hs
compiler/typecheck/TcInteract.hs
compiler/typecheck/TcMType.hs
compiler/typecheck/TcRnMonad.hs
compiler/typecheck/TcRnTypes.hs
compiler/typecheck/TcRules.hs
compiler/typecheck/TcSMonad.hs
compiler/typecheck/TcSimplify.hs
compiler/typecheck/TcType.hs
testsuite/tests/deriving/should_fail/T3621.stderr
testsuite/tests/indexed-types/should_fail/T8518.hs
testsuite/tests/typecheck/should_compile/tc211.stderr
testsuite/tests/typecheck/should_fail/T12589.stderr
testsuite/tests/typecheck/should_fail/T13311.stderr
testsuite/tests/typecheck/should_fail/T7851.stderr
testsuite/tests/typecheck/should_fail/T8603.stderr
testsuite/tests/typecheck/should_fail/tcfail122.stderr
testsuite/tests/warnings/should_fail/CaretDiagnostics1.stderr