Fix nasty Simplifier scoping bug
authorsimonpj@microsoft.com <unknown>
Sat, 14 Jun 2008 02:39:37 +0000 (02:39 +0000)
committersimonpj@microsoft.com <unknown>
Sat, 14 Jun 2008 02:39:37 +0000 (02:39 +0000)
commit562ce83f582f73526c169544dd29b76f3791677f
tree8d3bd9bfc4e02786554a4338f52cec2783c79601
parent67fee0f2a808a26a7e2d906394ec287a0fba6461
Fix nasty Simplifier scoping bug

This bug was somehow tickled by the new code for desugaring
polymorphic bindings, but the bug has been there a long time.  The
bindings floated out in simplLazyBind, generated by abstractFloats,
were getting processed by postInlineUnconditionally. But that was
wrong because part of their scope has already been processed.

That led to a bit of refactoring in the simplifier.  See comments
with Simplify.addPolyBind.

In principle this might happen in 6.8.3, but in practice it doesn't seem
to, so probably not worth merging.
compiler/simplCore/SimplEnv.lhs
compiler/simplCore/Simplify.lhs