Revise the inert-set invariants again
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 8 Dec 2014 13:23:31 +0000 (13:23 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 8 Dec 2014 13:39:39 +0000 (13:39 +0000)
commit1d44261c01fe2b8e455ed454e7c4b49d26c433b2
tree075d41bff5aca2e8c07446c75427ead31ea9817c
parentd64e682824631bc2a424f40b2776a2fbf457d122
Revise the inert-set invariants again

In particular this patch

- Accepts that rewriting with the inert CTyEqCans should be done recursively
  (hence removing the Bool result from flattenTyVarOuter)

- Refines the kick-out criterion, in paticular to avoid kick-out of (a -f-> ty)
  when f cannot rewrite f.  This is true of Wanteds and hence reduces kick-outs
  of Wanteds, perhaps by a lot

This stuff is not fully documented because the details are still settling, but
it's looking good.

(And it validates.)

This patch includes the testsuite wibbles.  perf/compiler/T5030 and
T5837 both improve in bytes-allocated (by 11% and 13% resp), which is
good.  I'm not sure which of today's short series of patches is
responsible, nor do I mind much.  (One could find out if necessary.)
compiler/typecheck/TcCanonical.hs
compiler/typecheck/TcFlatten.hs
compiler/typecheck/TcInteract.hs
testsuite/tests/indexed-types/should_compile/GADT1.hs
testsuite/tests/perf/compiler/all.T
testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
testsuite/tests/typecheck/should_fail/T7856.hs
testsuite/tests/typecheck/should_fail/T8603.stderr