patch applied (ghc-6.8/ghc): Make 'improvement' work properly in
igloo at earth.li
Sat Oct 27 14:03:40 EDT 2007
Sat Oct 27 08:54:59 PDT 2007 simonpj at microsoft.com
* Make 'improvement' work properly in TcSimplify
(Please merge this, and the preceding
handful from me to the 6.8 branch.)
This patch fixes a serious problem in the type checker, whereby
TcSimplify was going into a loop because it thought improvement
had taken place, but actually the unificataion was actually deferred.
We thereby fix Trac #1781, #1783, #1795, and #1797!
In fixing this I found what a mess TcSimplify.reduceContext is!
We need to fix this.
The main idea is to replace the "improvement flag" in Avails with
a simpler and more direct test: have any of the mutable type variables
in the (zonked) 'given' or 'irred' constraints been filled in?
This test uses the new function TcMType.isFilledMetaTyVar; the test
itself is towards the end of reduceContext.
I fixed a variety of other infelicities too, and left some ToDos.
M ./compiler/typecheck/TcMType.lhs -3 +13
M ./compiler/typecheck/TcSimplify.lhs -41 +66
More information about the Cvs-ghc