Repository : ssh://darcs.haskell.org//srv/darcs/packages/hoopl

On branch  : simonmar-hoopl-opt

http://hackage.haskell.org/trac/ghc/changeset/a277c590f31ceb8cb8fd284ac53b3318eb1216f4

>---------------------------------------------------------------

commit a277c590f31ceb8cb8fd284ac53b3318eb1216f4
Author: Simon Marlow <[email protected]>
Date:   Mon Jan 23 13:29:49 2012 +0000

    some strictness

>---------------------------------------------------------------

 src/Compiler/Hoopl/GraphUtil.hs |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/Compiler/Hoopl/GraphUtil.hs b/src/Compiler/Hoopl/GraphUtil.hs
index deb699b..72b94e1 100644
--- a/src/Compiler/Hoopl/GraphUtil.hs
+++ b/src/Compiler/Hoopl/GraphUtil.hs
@@ -33,14 +33,15 @@ splice bcat = sp
 
         sp (GUnit b) (GMany (JustO e) bs x) = {-# SCC "sp2" #-} GMany (JustO 
(b `bcat` e)) bs x
 
-        sp (GMany e bs (JustO x)) (GUnit b2) = {-# SCC "sp3" #-} GMany e bs 
(JustO (x `bcat` b2))
+        sp (GMany e bs (JustO x)) (GUnit b2) = {-# SCC "sp3" #-} x `seq` GMany 
e bs (JustO x')
+             where x' = x `bcat` b2
 
         sp (GMany e1 bs1 (JustO x1)) (GMany (JustO e2) b2 x2)
-          = {-# SCC "sp4" #-} GMany e1 (b1 `bodyUnion` b2) x2
-          where b1 = addBlock (x1 `bcat` e2) bs1
+          = {-# SCC "sp4" #-} (GMany e1 $! b1 `bodyUnion` b2) x2
+          where b1   = (addBlock $! x1 `bcat` e2) bs1
 
         sp (GMany e1 b1 NothingO) (GMany NothingO b2 x2)
-          = {-# SCC "sp5" #-} GMany e1 (b1 `bodyUnion` b2) x2
+          = {-# SCC "sp5" #-} (GMany e1 $! b1 `bodyUnion` b2) x2
 
         sp _ _ = error "bogus GADT match failure"
 



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to