[project @ 2003-04-09 08:07:58 by simonpj]
authorsimonpj <unknown>
Wed, 9 Apr 2003 08:07:58 +0000 (08:07 +0000)
committersimonpj <unknown>
Wed, 9 Apr 2003 08:07:58 +0000 (08:07 +0000)
commitcf31797e8ceef4ab4e9eadeb5c355806a56f7eee
treef89072266c18cf5589f8da50d1b7c9f505372083
parent92cee1fc0f88395d566888cdab8fdfdd2fb906a2
[project @ 2003-04-09 08:07:58 by simonpj]
-------------------------------------
      Fix a functional-dependency-related bug in
tcSimpifyRestricted
-------------------------------------

MERGE TO STABLE if it goes over conveniently
(but I rather think it may not)

tcSimplifyRestricted works by (a) simplifying brutall to find out
what the constrained type variables are, and (b) simplifying more
gently, knowing the constrained type varaibles.  The bug is that
in step (b) we were not doing the check-for-improvement-and-loop
part, thinking that step (a) had alrady done all the improvement.
But not so, as an example in the code now shows.

Simple to fix.  I rather think we could tidy up these various loops.
ghc/compiler/typecheck/TcSimplify.lhs