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

On branch  : master

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

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

commit e130689d4178bc9d49a25e19f93b5660ffec0be7
Author: George Roldugin <[email protected]>
Date:   Tue May 31 14:45:53 2011 +1000

    Work around TH list comp (can be undone later)

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

 examples/quickcheck/tests/Unlifted_Combinators.hs |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/examples/quickcheck/tests/Unlifted_Combinators.hs 
b/examples/quickcheck/tests/Unlifted_Combinators.hs
index 9b79c4b..34a537a 100644
--- a/examples/quickcheck/tests/Unlifted_Combinators.hs
+++ b/examples/quickcheck/tests/Unlifted_Combinators.hs
@@ -20,9 +20,10 @@ $(testcases [ ""        <@ [t| ( Bool, Int ) |]
 
   prop_pack :: (Eq a, Elt a) => Array a -> Array Bool -> Bool
   prop_pack arr flags =
-    toList (U.pack arr flags) == [x | (x,flag) <- P.zip arr' flags', flag]
-      where arr'   = toList arr
-            flags' = toList flags
+    toList (U.pack arr flags) == pack (toList arr) (toList flags)
+      where pack (x : xs) (True  : fs) = x : pack xs fs
+            pack (_ : xs) (False : fs) =     pack xs fs
+            pack _        _            = []
 
   prop_combine :: (Eq a, Elt a) => Array Bool -> Array a -> Array a -> Property
   prop_combine sel arr brr =



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

Reply via email to