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.
where
add_rules :: SimplEnv -> (InBndr,InExpr) -> (SimplEnv, (InBndr, OutBndr, InExpr))
-- Add the (substituted) rules to the binder
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)
where
(env', bndr') = addBndrRules env bndr (lookupRecBndr env bndr)