Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
180484cb
Commit
180484cb
authored
Dec 21, 2004
by
simonpj
Browse files
[project @ 2004-12-21 16:23:23 by simonpj]
Fix buglet in CSE
parent
970fca0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/simplCore/CSE.lhs
View file @
180484cb
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment