summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/simplCore/SimplCore.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/simplCore/SimplCore.hs b/compiler/simplCore/SimplCore.hs
index 7f2a0ea589..ade9816a1b 100644
--- a/compiler/simplCore/SimplCore.hs
+++ b/compiler/simplCore/SimplCore.hs
@@ -943,18 +943,18 @@ shortOutIndirections binds
makeIndEnv :: [CoreBind] -> IndEnv
makeIndEnv binds
- = foldr add_bind emptyVarEnv binds
+ = foldl' add_bind emptyVarEnv binds
where
- add_bind :: CoreBind -> IndEnv -> IndEnv
- add_bind (NonRec exported_id rhs) env = add_pair (exported_id, rhs) env
- add_bind (Rec pairs) env = foldr add_pair env pairs
+ add_bind :: IndEnv -> CoreBind -> IndEnv
+ add_bind env (NonRec exported_id rhs) = add_pair env (exported_id, rhs)
+ add_bind env (Rec pairs) = foldl' add_pair env pairs
- add_pair :: (Id,CoreExpr) -> IndEnv -> IndEnv
- add_pair (exported_id, exported) env
+ add_pair :: IndEnv -> (Id,CoreExpr) -> IndEnv
+ add_pair env (exported_id, exported)
| (ticks, Var local_id) <- stripTicksTop tickishFloatable exported
, shortMeOut env exported_id local_id
= extendVarEnv env local_id (exported_id, ticks)
- add_pair _ env = env
+ add_pair env _ = env
-----------------
shortMeOut :: IndEnv -> Id -> Id -> Bool