Commit 180484cb authored by simonpj's avatar simonpj
Browse files

[project @ 2004-12-21 16:23:23 by simonpj]

Fix buglet in CSE
parent 970fca0f
......@@ -132,8 +132,8 @@ cseBinds env (b:bs) = (b':bs')
bs' = cseBinds env1 bs
cseBind :: CSEnv -> CoreBind -> (CSEnv, CoreBind)
cseBind env (NonRec b e) = let (env', (_,e')) = do_one env (b, e)
in (env', NonRec b e')
cseBind env (NonRec b e) = let (env', (b',e')) = do_one env (b, e)
in (env', NonRec b' e')
cseBind env (Rec pairs) = let (env', pairs') = mapAccumL do_one env pairs
in (env', Rec pairs')
......@@ -175,7 +175,6 @@ cseExpr env (Lam b e) = let (env', b') = addBinder env b
in Lam b' (cseExpr env' e)
cseExpr env (Let bind e) = let (env', bind') = cseBind env bind
in Let bind' (cseExpr env' e)
-- gaw 2004
cseExpr env (Case scrut bndr ty alts) = Case scrut' bndr' ty (cseAlts env' scrut' bndr bndr' alts)
where
scrut' = tryForCSE env scrut
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment