From: simonpj@microsoft.com Date: Thu, 15 Nov 2007 08:42:42 +0000 (+0000) Subject: Make SpecConstr work again X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=a496c6a2211b821357872cb15c0204c848585b38 Make SpecConstr work again 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. --- diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs index dbad116..a27aa47 100644 --- a/compiler/simplCore/Simplify.lhs +++ b/compiler/simplCore/Simplify.lhs @@ -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)