@@ -308,6 +308,10 @@ dropWhileM =
308 fS = Prelude.length n - Prelude.length fL
308 fS = Prelude.length n - Prelude.length fL
309 in testUnfoldAD unf 0 fS n fL
309 in testUnfoldAD unf 0 fS n fL
311+-------------------------------------------------------------------------------
312+-- Stream combination
313+-------------------------------------------------------------------------------
311zipWithM :: Property
315zipWithM :: Property
312zipWithM =
316zipWithM =
@@ -336,6 +340,22 @@ outerProduct =
336 lst = [(a, b) :: (Int, Int) | a <- [0 .. 10], b <- [0 .. 20]]
340 lst = [(a, b) :: (Int, Int) | a <- [0 .. 10], b <- [0 .. 20]]
337 in testUnfold unf ((0, 0) :: (Int, Int)) lst
341 in testUnfold unf ((0, 0) :: (Int, Int)) lst
352+ (modify (+ 1) >> return b)))
353+ listInF b = replicate 10 b
354+ unfOut = UF.enumerateFromToIntegral 10
355+ unf = UF.concatMapM unfInF unfOut
356+ list = List.concatMap listInF [1 .. 10]
357+ in testUnfoldAD unf 0 110 1 list
339-------------------------------------------------------------------------------
359-------------------------------------------------------------------------------
340-- Test groups
360-- Test groups
341-------------------------------------------------------------------------------
361-------------------------------------------------------------------------------
@@ -399,19 +419,35 @@ testTransformation =
399 -- prop "dropWhile" dropWhile
419 -- prop "dropWhile" dropWhile
400 prop "dropWhileM" dropWhileM
420 prop "dropWhileM" dropWhileM
423+testCombination :: Spec
425+ describe "Transformation"
427+ prop "zipWithM" zipWithM
428+ -- prop "zipWith" zipWith
429+ -- prop "teeZipWith" teeZipWith
430+ prop "concat" concat
431+ prop "concatMapM" concatMapM
432+ prop "outerProduct" outerProduct
434+ -- prop "apDiscardFst" apDiscardFst
435+ -- prop "apDiscardSnd" apDiscardSnd
402-------------------------------------------------------------------------------
438-------------------------------------------------------------------------------
404-------------------------------------------------------------------------------
440-------------------------------------------------------------------------------
406main :: IO ()
442main :: IO ()
407−main = hspec $ do
444+ hspec
411− describe "Unfold tests" $ do
445+ $ describe "Unfold tests"
412− prop "zipWithM" zipWithM
446+ $ do
413− prop "concat" concat
447+ testInputOps
414− prop "outerProduct" outerProduct
448+ testGeneration
415 -- prop "concatMapM" concatMapM
451 -- prop "concatMapM" concatMapM
416 -- prop "gbracket" gbracket
452 -- prop "gbracket" gbracket
417 -- prop "gbracketIO" gbracketIO
453 -- prop "gbracketIO" gbracketIO