Make SpecConstr work again
authorsimonpj@microsoft.com <unknown>
Thu, 15 Nov 2007 08:42:42 +0000 (08:42 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 15 Nov 2007 08:42:42 +0000 (08:42 +0000)
In a typo I'd written env instead of env', and as a result RULES are
practically guaranteed not to work in a recursive group.  This pretty
much kills SpecConstr in its tracks!

Well done Kenny Lu for spotting this.  The fix is easy.

Merge into 6.8 please.

compiler/simplCore/Simplify.lhs

index dbad116..a27aa47 100644 (file)
@@ -264,7 +264,7 @@ simplRecBind env top_lvl pairs
   where
     add_rules :: SimplEnv -> (InBndr,InExpr) -> (SimplEnv, (InBndr, OutBndr, InExpr))
        -- Add the (substituted) rules to the binder
-    add_rules env (bndr, rhs) = (env, (bndr, bndr', rhs))
+    add_rules env (bndr, rhs) = (env', (bndr, bndr', rhs))
        where
          (env', bndr') = addBndrRules env bndr (lookupRecBndr env bndr)