summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmmEnv.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2016-05-10 11:57:02 +0200
committerBen Gamari <ben@smart-cactus.org>2016-05-12 15:16:07 +0200
commitba46dd060f959e3c96a74c1546946c3f8bf84dd0 (patch)
treefaa22032f485d0222bb102645971dd82e76236c2 /compiler/codeGen/StgCmmEnv.hs
parente996e85f003e783fc8f9af0da653cdd0058d9646 (diff)
downloadhaskell-wip/foldl.tar.gz
Use strict foldlswip/foldl
Diffstat (limited to 'compiler/codeGen/StgCmmEnv.hs')
-rw-r--r--compiler/codeGen/StgCmmEnv.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/codeGen/StgCmmEnv.hs b/compiler/codeGen/StgCmmEnv.hs
index 8dbb646cdc..a6dc5cb27f 100644
--- a/compiler/codeGen/StgCmmEnv.hs
+++ b/compiler/codeGen/StgCmmEnv.hs
@@ -45,6 +45,8 @@ import Name
import StgSyn
import Outputable
+import Data.Foldable ( foldl' )
+
-------------------------------------
-- Non-void types
-------------------------------------
@@ -130,9 +132,9 @@ addBindC stuff_to_bind = do
addBindsC :: [CgIdInfo] -> FCode ()
addBindsC new_bindings = do
binds <- getBinds
- let new_binds = foldl (\ binds info -> extendVarEnv binds (cg_id info) info)
- binds
- new_bindings
+ let new_binds = foldl' (\ binds info -> extendVarEnv binds (cg_id info) info)
+ binds
+ new_bindings
setBinds new_binds
getCgIdInfo :: Id -> FCode CgIdInfo