Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : supercompiler

http://hackage.haskell.org/trac/ghc/changeset/021214f87371dfa1c1e1f65e4b6e494333e37bb9

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

commit 021214f87371dfa1c1e1f65e4b6e494333e37bb9
Author: Max Bolingbroke <batterseapo...@hotmail.com>
Date:   Fri Oct 19 12:48:48 2012 +0100

    Made pairT lazier

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

 .../Supercompile/Termination/Combinators.hs        |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/compiler/supercompile/Supercompile/Termination/Combinators.hs 
b/compiler/supercompile/Supercompile/Termination/Combinators.hs
index 80c8fcb..d7639ac 100644
--- a/compiler/supercompile/Supercompile/Termination/Combinators.hs
+++ b/compiler/supercompile/Supercompile/Termination/Combinators.hs
@@ -111,9 +111,10 @@ pairT :: TTest a -> TTest b -> TTest (a, b)
 pairT (WQO prepare_a embed_a) (WQO prepare_b embed_b) = WQO (prepare_a *** 
prepare_b) go
   where go (a1, b1) (a2, b2) = zipPair ((&&), (&&)) (a1 `embed_a` a2) (b1 
`embed_b` b2)
 
+-- NB: zipPair is lazy in the second pair so that when f/g are (&&) we can 
doing some evaluation
 zipPair :: (a -> b -> c, d -> e -> f)
         -> (a, d) -> (b, e) -> (c, f)
-zipPair (f, g) (a, d) (b, e) = (f a b, g d e)
+zipPair (f, g) (a, d) ~(b, e) = (f a b, g d e)
 
 -- | Type class of zippable things. Instances should satisfy the laws:
 --



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to