on master help sign in
rename some qualified imports
b856396Harendra Kumar
src/Streamly/Streams/Serial.hs+2−2
@@ -53,7 +53,7 @@ import Control.Monad.Trans.Class (MonadTrans(lift))
53import Data.Semigroup (Semigroup(..))
53import Data.Semigroup (Semigroup(..))
54
54
55import Streamly.Streams.StreamK hiding (serial)
55import Streamly.Streams.StreamK hiding (serial)
56−import qualified Streamly.Streams.StreamK as C
56+import qualified Streamly.Streams.StreamK as K
57
57
58#include "Instances.hs"
58#include "Instances.hs"
59
59
@@ -162,7 +162,7 @@ instance IsStream SerialT where
162-- @since 0.2.0
162-- @since 0.2.0
163{-# INLINE serial #-}
163{-# INLINE serial #-}
164serial :: IsStream t => t m a -> t m a -> t m a
164serial :: IsStream t => t m a -> t m a -> t m a
165−serial m1 m2 = fromStream $ C.serial (toStream m1) (toStream m2)
165+serial m1 m2 = fromStream $ K.serial (toStream m1) (toStream m2)
166
166
167------------------------------------------------------------------------------
167------------------------------------------------------------------------------
168-- Monad
168-- Monad
test/Main.hs+54−54
@@ -15,22 +15,22 @@ import Test.Hspec
15
15
16import Streamly
16import Streamly
17import Streamly.Prelude ((.:), nil)
17import Streamly.Prelude ((.:), nil)
18−import qualified Streamly.Prelude as A
18+import qualified Streamly.Prelude as S
19
19
20singleton :: IsStream t => a -> t m a
20singleton :: IsStream t => a -> t m a
21singleton a = a .: nil
21singleton a = a .: nil
22
22
23toListSerial :: SerialT IO a -> IO [a]
23toListSerial :: SerialT IO a -> IO [a]
24−toListSerial = A.toList . serially
24+toListSerial = S.toList . serially
25
25
26toListInterleaved :: WSerialT IO a -> IO [a]
26toListInterleaved :: WSerialT IO a -> IO [a]
27−toListInterleaved = A.toList . wSerially
27+toListInterleaved = S.toList . wSerially
28
28
29toListAsync :: AsyncT IO a -> IO [a]
29toListAsync :: AsyncT IO a -> IO [a]
30−toListAsync = A.toList . asyncly
30+toListAsync = S.toList . asyncly
31
31
32toListParallel :: WAsyncT IO a -> IO [a]
32toListParallel :: WAsyncT IO a -> IO [a]
33−toListParallel = A.toList . wAsyncly
33+toListParallel = S.toList . wAsyncly
34
34
35main :: IO ()
35main :: IO ()
36main = hspec $ do
36main = hspec $ do
@@ -40,7 +40,7 @@ main = hspec $ do
40 it "simple serially" $
40 it "simple serially" $
41 (runStream . serially) (return (0 :: Int)) `shouldReturn` ()
41 (runStream . serially) (return (0 :: Int)) `shouldReturn` ()
42 it "simple serially with IO" $
42 it "simple serially with IO" $
43− (runStream . serially) (A.yieldM $ putStrLn "hello") `shouldReturn` ()
43+ (runStream . serially) (S.yieldM $ putStrLn "hello") `shouldReturn` ()
44
44
45 describe "Empty" $ do
45 describe "Empty" $ do
46 it "Monoid - mempty" $
46 it "Monoid - mempty" $
@@ -177,7 +177,7 @@ main = hspec $ do
177 `shouldReturn` ([4,4,8,8,0,0,2,2])
177 `shouldReturn` ([4,4,8,8,0,0,2,2])
178 -}
178 -}
179 it "Nest <|>, <>, <|> (2)" $
179 it "Nest <|>, <>, <|> (2)" $
180− (A.toList . wAsyncly) (
180+ (S.toList . wAsyncly) (
181 s (p (t 4 <> t 8) <> p (t 1 <> t 2))
181 s (p (t 4 <> t 8) <> p (t 1 <> t 2))
182 <> s (p (t 4 <> t 8) <> p (t 1 <> t 2)))
182 <> s (p (t 4 <> t 8) <> p (t 1 <> t 2)))
183 `shouldReturn` ([4,4,8,8,1,1,2,2])
183 `shouldReturn` ([4,4,8,8,1,1,2,2])
@@ -198,7 +198,7 @@ main = hspec $ do
198 `shouldReturn` ([4,4,1,1,8,2,9,2])
198 `shouldReturn` ([4,4,1,1,8,2,9,2])
199 -}
199 -}
200 it "Nest <|>, <|>, <|>" $
200 it "Nest <|>, <|>, <|>" $
201− (A.toList . wAsyncly) (
201+ (S.toList . wAsyncly) (
202 ((t 4 <> t 8) <> (t 0 <> t 2))
202 ((t 4 <> t 8) <> (t 0 <> t 2))
203 <> ((t 4 <> t 8) <> (t 0 <> t 2)))
203 <> ((t 4 <> t 8) <> (t 0 <> t 2)))
204 `shouldReturn` ([0,0,2,2,4,4,8,8])
204 `shouldReturn` ([0,0,2,2,4,4,8,8])
@@ -381,12 +381,12 @@ main = hspec $ do
381
381
382 it "asyncly crosses thread limit (2000 threads)" $
382 it "asyncly crosses thread limit (2000 threads)" $
383 runStream (asyncly $ fold $
383 runStream (asyncly $ fold $
384− replicate 2000 $ A.yieldM $ threadDelay 1000000)
384+ replicate 2000 $ S.yieldM $ threadDelay 1000000)
385 `shouldReturn` ()
385 `shouldReturn` ()
386
386
387 it "aheadly crosses thread limit (4000 threads)" $
387 it "aheadly crosses thread limit (4000 threads)" $
388 runStream (aheadly $ fold $
388 runStream (aheadly $ fold $
389− replicate 4000 $ A.yieldM $ threadDelay 1000000)
389+ replicate 4000 $ S.yieldM $ threadDelay 1000000)
390 `shouldReturn` ()
390 `shouldReturn` ()
391
391
392-- XXX need to test that we have promptly cleaned up everything after the error
392-- XXX need to test that we have promptly cleaned up everything after the error
@@ -421,10 +421,10 @@ composeWithMonadThrow
421 => (t IO Int -> SerialT IO Int) -> Spec
421 => (t IO Int -> SerialT IO Int) -> Spec
422composeWithMonadThrow t = do
422composeWithMonadThrow t = do
423 it "Compose throwM, nil" $
423 it "Compose throwM, nil" $
424− (try $ tl (throwM (ExampleException "E") <> A.nil))
424+ (try $ tl (throwM (ExampleException "E") <> S.nil))
425 `shouldReturn` (Left (ExampleException "E") :: Either ExampleException [Int])
425 `shouldReturn` (Left (ExampleException "E") :: Either ExampleException [Int])
426 it "Compose nil, throwM" $
426 it "Compose nil, throwM" $
427− (try $ tl (A.nil <> throwM (ExampleException "E")))
427+ (try $ tl (S.nil <> throwM (ExampleException "E")))
428 `shouldReturn` (Left (ExampleException "E") :: Either ExampleException [Int])
428 `shouldReturn` (Left (ExampleException "E") :: Either ExampleException [Int])
429 oneLevelNestedSum "serially" serially
429 oneLevelNestedSum "serially" serially
430 oneLevelNestedSum "wSerially" wSerially
430 oneLevelNestedSum "wSerially" wSerially
@@ -438,12 +438,12 @@ composeWithMonadThrow t = do
438 oneLevelNestedProduct "wAsyncly" wAsyncly
438 oneLevelNestedProduct "wAsyncly" wAsyncly
439
439
440 where
440 where
441− tl = A.toList . t
441+ tl = S.toList . t
442 oneLevelNestedSum desc t1 =
442 oneLevelNestedSum desc t1 =
443 it ("One level nested sum " ++ desc) $ do
443 it ("One level nested sum " ++ desc) $ do
444− let nested = (A.fromFoldable [1..10] <> throwM (ExampleException "E")
444+ let nested = (S.fromFoldable [1..10] <> throwM (ExampleException "E")
445− <> A.fromFoldable [1..10])
445+ <> S.fromFoldable [1..10])
446− (try $ tl (A.nil <> t1 nested <> A.fromFoldable [1..10]))
446+ (try $ tl (S.nil <> t1 nested <> S.fromFoldable [1..10]))
447 `shouldReturn` (Left (ExampleException "E") :: Either ExampleException [Int])
447 `shouldReturn` (Left (ExampleException "E") :: Either ExampleException [Int])
448
448
449 oneLevelNestedProduct desc t1 =
449 oneLevelNestedProduct desc t1 =
@@ -466,11 +466,11 @@ _composeWithMonadError
466 )
466 )
467 => (t (ExceptT String IO) Int -> SerialT (ExceptT String IO) Int) -> Spec
467 => (t (ExceptT String IO) Int -> SerialT (ExceptT String IO) Int) -> Spec
468_composeWithMonadError t = do
468_composeWithMonadError t = do
469− let tl = A.toList . t
469+ let tl = S.toList . t
470 it "Compose throwError, nil" $
470 it "Compose throwError, nil" $
471− (runExceptT $ tl (throwError "E" <> A.nil)) `shouldReturn` Left "E"
471+ (runExceptT $ tl (throwError "E" <> S.nil)) `shouldReturn` Left "E"
472 it "Compose nil, error" $
472 it "Compose nil, error" $
473− (runExceptT $ tl (A.nil <> throwError "E")) `shouldReturn` Left "E"
473+ (runExceptT $ tl (S.nil <> throwError "E")) `shouldReturn` Left "E"
474
474
475nestTwoSerial :: Expectation
475nestTwoSerial :: Expectation
476nestTwoSerial =
476nestTwoSerial =
@@ -486,7 +486,7 @@ nestTwoAhead :: Expectation
486nestTwoAhead =
486nestTwoAhead =
487 let s1 = foldMapWith (<>) return [1..4]
487 let s1 = foldMapWith (<>) return [1..4]
488 s2 = foldMapWith (<>) return [5..8]
488 s2 = foldMapWith (<>) return [5..8]
489− in (A.toList . aheadly) (do
489+ in (S.toList . aheadly) (do
490 x <- s1
490 x <- s1
491 y <- s2
491 y <- s2
492 return (x + y)
492 return (x + y)
@@ -503,7 +503,7 @@ nestTwoAheadApp :: Expectation
503nestTwoAheadApp =
503nestTwoAheadApp =
504 let s1 = foldMapWith (<>) return [1..4]
504 let s1 = foldMapWith (<>) return [1..4]
505 s2 = foldMapWith (<>) return [5..8]
505 s2 = foldMapWith (<>) return [5..8]
506− in (A.toList . aheadly) ((+) <$> s1 <*> s2)
506+ in (S.toList . aheadly) ((+) <$> s1 <*> s2)
507 `shouldReturn` ([6,7,8,9,7,8,9,10,8,9,10,11,9,10,11,12] :: [Int])
507 `shouldReturn` ([6,7,8,9,7,8,9,10,8,9,10,11,9,10,11,12] :: [Int])
508
508
509nestTwoInterleaved :: Expectation
509nestTwoInterleaved :: Expectation
@@ -545,7 +545,7 @@ nestTwoWAsync :: Expectation
545nestTwoWAsync =
545nestTwoWAsync =
546 let s1 = foldMapWith (<>) return [1..4]
546 let s1 = foldMapWith (<>) return [1..4]
547 s2 = foldMapWith (<>) return [5..8]
547 s2 = foldMapWith (<>) return [5..8]
548− in ((A.toList . wAsyncly) (do
548+ in ((S.toList . wAsyncly) (do
549 x <- s1
549 x <- s1
550 y <- s2
550 y <- s2
551 return (x + y)
551 return (x + y)
@@ -556,7 +556,7 @@ nestTwoParallel :: Expectation
556nestTwoParallel =
556nestTwoParallel =
557 let s1 = foldMapWith (<>) return [1..4]
557 let s1 = foldMapWith (<>) return [1..4]
558 s2 = foldMapWith (<>) return [5..8]
558 s2 = foldMapWith (<>) return [5..8]
559− in ((A.toList . parallely) (do
559+ in ((S.toList . parallely) (do
560 x <- s1
560 x <- s1
561 y <- s2
561 y <- s2
562 return (x + y)
562 return (x + y)
@@ -567,18 +567,18 @@ nestTwoWAsyncApp :: Expectation
567nestTwoWAsyncApp =
567nestTwoWAsyncApp =
568 let s1 = foldMapWith (<>) return [1..4]
568 let s1 = foldMapWith (<>) return [1..4]
569 s2 = foldMapWith (<>) return [5..8]
569 s2 = foldMapWith (<>) return [5..8]
570− in ((A.toList . wAsyncly) ((+) <$> s1 <*> s2) >>= return . sort)
570+ in ((S.toList . wAsyncly) ((+) <$> s1 <*> s2) >>= return . sort)
571 `shouldReturn` sort ([6,7,7,8,8,8,9,9,9,9,10,10,10,11,11,12] :: [Int])
571 `shouldReturn` sort ([6,7,7,8,8,8,9,9,9,9,10,10,10,11,11,12] :: [Int])
572
572
573nestTwoParallelApp :: Expectation
573nestTwoParallelApp :: Expectation
574nestTwoParallelApp =
574nestTwoParallelApp =
575 let s1 = foldMapWith (<>) return [1..4]
575 let s1 = foldMapWith (<>) return [1..4]
576 s2 = foldMapWith (<>) return [5..8]
576 s2 = foldMapWith (<>) return [5..8]
577− in ((A.toList . parallely) ((+) <$> s1 <*> s2) >>= return . sort)
577+ in ((S.toList . parallely) ((+) <$> s1 <*> s2) >>= return . sort)
578 `shouldReturn` sort ([6,7,7,8,8,8,9,9,9,9,10,10,10,11,11,12] :: [Int])
578 `shouldReturn` sort ([6,7,7,8,8,8,9,9,9,9,10,10,10,11,11,12] :: [Int])
579
579
580timed :: (IsStream t, Monad (t IO)) => Int -> t IO Int
580timed :: (IsStream t, Monad (t IO)) => Int -> t IO Int
581−timed x = A.yieldM (threadDelay (x * 100000)) >> return x
581+timed x = S.yieldM (threadDelay (x * 100000)) >> return x
582
582
583interleaveCheck :: IsStream t
583interleaveCheck :: IsStream t
584 => (t IO Int -> SerialT IO Int)
584 => (t IO Int -> SerialT IO Int)
@@ -586,7 +586,7 @@ interleaveCheck :: IsStream t
586 -> Spec
586 -> Spec
587interleaveCheck t f =
587interleaveCheck t f =
588 it "Interleave four" $
588 it "Interleave four" $
589− (A.toList . t) ((singleton 0 `f` singleton 1) `f` (singleton 100 `f` singleton 101))
589+ (S.toList . t) ((singleton 0 `f` singleton 1) `f` (singleton 100 `f` singleton 101))
590 `shouldReturn` ([0, 100, 1, 101])
590 `shouldReturn` ([0, 100, 1, 101])
591
591
592parallelCheck :: (IsStream t, Monad (t IO))
592parallelCheck :: (IsStream t, Monad (t IO))
@@ -595,14 +595,14 @@ parallelCheck :: (IsStream t, Monad (t IO))
595 -> Spec
595 -> Spec
596parallelCheck t f = do
596parallelCheck t f = do
597 it "Parallel ordering left associated" $
597 it "Parallel ordering left associated" $
598− (A.toList . t) (((event 4 `f` event 3) `f` event 2) `f` event 1)
598+ (S.toList . t) (((event 4 `f` event 3) `f` event 2) `f` event 1)
599 `shouldReturn` ([1..4])
599 `shouldReturn` ([1..4])
600
600
601 it "Parallel ordering right associated" $
601 it "Parallel ordering right associated" $
602− (A.toList . t) (event 4 `f` (event 3 `f` (event 2 `f` event 1)))
602+ (S.toList . t) (event 4 `f` (event 3 `f` (event 2 `f` event 1)))
603 `shouldReturn` ([1..4])
603 `shouldReturn` ([1..4])
604
604
605− where event n = (A.yieldM $ threadDelay (n * 100000)) >> (return n)
605+ where event n = (S.yieldM $ threadDelay (n * 100000)) >> (return n)
606
606
607compose :: (IsStream t, Semigroup (t IO Int))
607compose :: (IsStream t, Semigroup (t IO Int))
608 => (t IO Int -> SerialT IO Int) -> t IO Int -> ([Int] -> [Int]) -> Spec
608 => (t IO Int -> SerialT IO Int) -> t IO Int -> ([Int] -> [Int]) -> Spec
@@ -635,7 +635,7 @@ compose t z srt = do
635 ((tl $ (((singleton 0 <> singleton 1) <> (singleton 2 <> singleton 3))
635 ((tl $ (((singleton 0 <> singleton 1) <> (singleton 2 <> singleton 3))
636 <> ((singleton 4 <> singleton 5) <> (singleton 6 <> singleton 7)))
636 <> ((singleton 4 <> singleton 5) <> (singleton 6 <> singleton 7)))
637 ) >>= return . srt) `shouldReturn` [0..7]
637 ) >>= return . srt) `shouldReturn` [0..7]
638− where tl = A.toList . t
638+ where tl = S.toList . t
639
639
640composeAndComposeSimple
640composeAndComposeSimple
641 :: ( IsStream t1, Semigroup (t1 IO Int)
641 :: ( IsStream t1, Semigroup (t1 IO Int)
@@ -650,20 +650,20 @@ composeAndComposeSimple
650composeAndComposeSimple t1 t2 answer = do
650composeAndComposeSimple t1 t2 answer = do
651 let rfold = adapt . t2 . foldMapWith (<>) return
651 let rfold = adapt . t2 . foldMapWith (<>) return
652 it "Compose right associated outer expr, right folded inner" $
652 it "Compose right associated outer expr, right folded inner" $
653− ((A.toList . t1) (rfold [1,2,3] <> (rfold [4,5,6] <> rfold [7,8,9])))
653+ ((S.toList . t1) (rfold [1,2,3] <> (rfold [4,5,6] <> rfold [7,8,9])))
654 `shouldReturn` (answer !! 0)
654 `shouldReturn` (answer !! 0)
655
655
656 it "Compose left associated outer expr, right folded inner" $
656 it "Compose left associated outer expr, right folded inner" $
657− ((A.toList . t1) ((rfold [1,2,3] <> rfold [4,5,6]) <> rfold [7,8,9]))
657+ ((S.toList . t1) ((rfold [1,2,3] <> rfold [4,5,6]) <> rfold [7,8,9]))
658 `shouldReturn` (answer !! 1)
658 `shouldReturn` (answer !! 1)
659
659
660 let lfold xs = adapt $ t2 $ foldl (<>) mempty $ map return xs
660 let lfold xs = adapt $ t2 $ foldl (<>) mempty $ map return xs
661 it "Compose right associated outer expr, left folded inner" $
661 it "Compose right associated outer expr, left folded inner" $
662− ((A.toList . t1) (lfold [1,2,3] <> (lfold [4,5,6] <> lfold [7,8,9])))
662+ ((S.toList . t1) (lfold [1,2,3] <> (lfold [4,5,6] <> lfold [7,8,9])))
663 `shouldReturn` (answer !! 2)
663 `shouldReturn` (answer !! 2)
664
664
665 it "Compose left associated outer expr, left folded inner" $
665 it "Compose left associated outer expr, left folded inner" $
666− ((A.toList . t1) ((lfold [1,2,3] <> lfold [4,5,6]) <> lfold [7,8,9]))
666+ ((S.toList . t1) ((lfold [1,2,3] <> lfold [4,5,6]) <> lfold [7,8,9]))
667 `shouldReturn` (answer !! 3)
667 `shouldReturn` (answer !! 3)
668
668
669loops
669loops
@@ -673,21 +673,21 @@ loops
673 -> ([Int] -> [Int])
673 -> ([Int] -> [Int])
674 -> Spec
674 -> Spec
675loops t tsrt hsrt = do
675loops t tsrt hsrt = do
676− it "Tail recursive loop" $ ((A.toList . adapt) (loopTail 0) >>= return . tsrt)
676+ it "Tail recursive loop" $ ((S.toList . adapt) (loopTail 0) >>= return . tsrt)
677 `shouldReturn` [0..3]
677 `shouldReturn` [0..3]
678
678
679− it "Head recursive loop" $ ((A.toList . adapt) (loopHead 0) >>= return . hsrt)
679+ it "Head recursive loop" $ ((S.toList . adapt) (loopHead 0) >>= return . hsrt)
680 `shouldReturn` [0..3]
680 `shouldReturn` [0..3]
681
681
682 where
682 where
683 loopHead x = do
683 loopHead x = do
684 -- this print line is important for the test (causes a bind)
684 -- this print line is important for the test (causes a bind)
685− A.yieldM $ putStrLn "LoopHead..."
685+ S.yieldM $ putStrLn "LoopHead..."
686 t $ (if x < 3 then loopHead (x + 1) else nil) <> return x
686 t $ (if x < 3 then loopHead (x + 1) else nil) <> return x
687
687
688 loopTail x = do
688 loopTail x = do
689 -- this print line is important for the test (causes a bind)
689 -- this print line is important for the test (causes a bind)
690− A.yieldM $ putStrLn "LoopTail..."
690+ S.yieldM $ putStrLn "LoopTail..."
691 t $ return x <> (if x < 3 then loopTail (x + 1) else nil)
691 t $ return x <> (if x < 3 then loopTail (x + 1) else nil)
692
692
693bindAndComposeSimple
693bindAndComposeSimple
@@ -698,12 +698,12 @@ bindAndComposeSimple
698bindAndComposeSimple t1 t2 = do
698bindAndComposeSimple t1 t2 = do
699 -- XXX need a bind in the body of forEachWith instead of a simple return
699 -- XXX need a bind in the body of forEachWith instead of a simple return
700 it "Compose many (right fold) with bind" $
700 it "Compose many (right fold) with bind" $
701− ((A.toList . t1) (adapt . t2 $ forEachWith (<>) [1..10 :: Int] return)
701+ ((S.toList . t1) (adapt . t2 $ forEachWith (<>) [1..10 :: Int] return)
702 >>= return . sort) `shouldReturn` [1..10]
702 >>= return . sort) `shouldReturn` [1..10]
703
703
704 it "Compose many (left fold) with bind" $
704 it "Compose many (left fold) with bind" $
705 let forL xs k = foldl (<>) nil $ map k xs
705 let forL xs k = foldl (<>) nil $ map k xs
706− in ((A.toList . t1) (adapt . t2 $ forL [1..10 :: Int] return)
706+ in ((S.toList . t1) (adapt . t2 $ forL [1..10 :: Int] return)
707 >>= return . sort) `shouldReturn` [1..10]
707 >>= return . sort) `shouldReturn` [1..10]
708
708
709bindAndComposeHierarchy
709bindAndComposeHierarchy
@@ -715,7 +715,7 @@ bindAndComposeHierarchy
715 -> Spec
715 -> Spec
716bindAndComposeHierarchy t1 t2 g = do
716bindAndComposeHierarchy t1 t2 g = do
717 it "Bind and compose nested" $
717 it "Bind and compose nested" $
718− ((A.toList . t1) bindComposeNested >>= return . sort)
718+ ((S.toList . t1) bindComposeNested >>= return . sort)
719 `shouldReturn` (sort (
719 `shouldReturn` (sort (
720 [12, 18]
720 [12, 18]
721 ++ replicate 3 13
721 ++ replicate 3 13
@@ -755,21 +755,21 @@ mixedOps = do
755
755
756 composeMixed :: SerialT IO Int
756 composeMixed :: SerialT IO Int
757 composeMixed = do
757 composeMixed = do
758− A.yieldM $ return ()
758+ S.yieldM $ return ()
759− A.yieldM $ putStr ""
759+ S.yieldM $ putStr ""
760 x <- return 1
760 x <- return 1
761 y <- return 2
761 y <- return 2
762 z <- do
762 z <- do
763 x1 <- wAsyncly $ return 1 <> return 2
763 x1 <- wAsyncly $ return 1 <> return 2
764− A.yieldM $ return ()
764+ S.yieldM $ return ()
765− A.yieldM $ putStr ""
765+ S.yieldM $ putStr ""
766 y1 <- asyncly $ return 1 <> return 2
766 y1 <- asyncly $ return 1 <> return 2
767 z1 <- do
767 z1 <- do
768 x11 <- return 1 <> return 2
768 x11 <- return 1 <> return 2
769 y11 <- asyncly $ return 1 <> return 2
769 y11 <- asyncly $ return 1 <> return 2
770 z11 <- wSerially $ return 1 <> return 2
770 z11 <- wSerially $ return 1 <> return 2
771− A.yieldM $ return ()
771+ S.yieldM $ return ()
772− A.yieldM $ putStr ""
772+ S.yieldM $ putStr ""
773 return (x11 + y11 + z11)
773 return (x11 + y11 + z11)
774 return (x1 + y1 + z1)
774 return (x1 + y1 + z1)
775 return (x + y + z)
775 return (x + y + z)
@@ -785,21 +785,21 @@ mixedOpsAheadly = do
785
785
786 composeMixed :: SerialT IO Int
786 composeMixed :: SerialT IO Int
787 composeMixed = do
787 composeMixed = do
788− A.yieldM $ return ()
788+ S.yieldM $ return ()
789− A.yieldM $ putStr ""
789+ S.yieldM $ putStr ""
790 x <- return 1
790 x <- return 1
791 y <- return 2
791 y <- return 2
792 z <- do
792 z <- do
793 x1 <- wAsyncly $ return 1 <> return 2
793 x1 <- wAsyncly $ return 1 <> return 2
794− A.yieldM $ return ()
794+ S.yieldM $ return ()
795− A.yieldM $ putStr ""
795+ S.yieldM $ putStr ""
796 y1 <- aheadly $ return 1 <> return 2
796 y1 <- aheadly $ return 1 <> return 2
797 z1 <- do
797 z1 <- do
798 x11 <- return 1 <> return 2
798 x11 <- return 1 <> return 2
799 y11 <- aheadly $ return 1 <> return 2
799 y11 <- aheadly $ return 1 <> return 2
800 z11 <- parallely $ return 1 <> return 2
800 z11 <- parallely $ return 1 <> return 2
801− A.yieldM $ return ()
801+ S.yieldM $ return ()
802− A.yieldM $ putStr ""
802+ S.yieldM $ putStr ""
803 return (x11 + y11 + z11)
803 return (x11 + y11 + z11)
804 return (x1 + y1 + z1)
804 return (x1 + y1 + z1)
805 return (x + y + z)
805 return (x + y + z)
test/Prop.hs+161−161
@@ -21,7 +21,7 @@ import Test.Hspec
21
21
22import Streamly
22import Streamly
23import Streamly.Prelude ((.:), nil)
23import Streamly.Prelude ((.:), nil)
24−import qualified Streamly.Prelude as A
24+import qualified Streamly.Prelude as S
25
25
26maxTestCount :: Int
26maxTestCount :: Int
27#ifdef DEVBUILD
27#ifdef DEVBUILD
@@ -54,7 +54,7 @@ constructWithReplicateM
54constructWithReplicateM op len =
54constructWithReplicateM op len =
55 monadicIO $ do
55 monadicIO $ do
56 let x = return (1 :: Int)
56 let x = return (1 :: Int)
57− stream <- run $ (A.toList . op) (A.replicateM (fromIntegral len) x)
57+ stream <- run $ (S.toList . op) (S.replicateM (fromIntegral len) x)
58 list <- run $ replicateM (fromIntegral len) x
58 list <- run $ replicateM (fromIntegral len) x
59 equals (==) stream list
59 equals (==) stream list
60
60
@@ -67,7 +67,7 @@ transformFromList
67 -> Property
67 -> Property
68transformFromList constr eq listOp op a =
68transformFromList constr eq listOp op a =
69 monadicIO $ do
69 monadicIO $ do
70− stream <- run ((A.toList . op) (constr a))
70+ stream <- run ((S.toList . op) (constr a))
71 let list = listOp a
71 let list = listOp a
72 equals eq stream list
72 equals eq stream list
73
73
@@ -105,7 +105,7 @@ concurrentMapM constr eq op n =
105 let list = [0..n]
105 let list = [0..n]
106 stream <- run $ do
106 stream <- run $ do
107 mv <- newEmptyMVar :: IO (MVar ())
107 mv <- newEmptyMVar :: IO (MVar ())
108− (A.toList . (op n mv)) (constr list)
108+ (S.toList . (op n mv)) (constr list)
109 equals eq stream list
109 equals eq stream list
110
110
111concurrentFromFoldable
111concurrentFromFoldable
@@ -119,11 +119,11 @@ concurrentFromFoldable eq op n =
119 let list = [0..n]
119 let list = [0..n]
120 stream <- run $ do
120 stream <- run $ do
121 mv <- newEmptyMVar :: IO (MVar ())
121 mv <- newEmptyMVar :: IO (MVar ())
122− (A.toList . op) (A.fromFoldableM (map (mvarSequenceOp mv n) list))
122+ (S.toList . op) (S.fromFoldableM (map (mvarSequenceOp mv n) list))
123 equals eq stream list
123 equals eq stream list
124
124
125sourceUnfoldrM :: IsStream t => MVar () -> Word8 -> t IO Word8
125sourceUnfoldrM :: IsStream t => MVar () -> Word8 -> t IO Word8
126−sourceUnfoldrM mv n = A.unfoldrM step 0
126+sourceUnfoldrM mv n = S.unfoldrM step 0
127 where
127 where
128 -- argument must be integer to avoid overflow of word8 at 255
128 -- argument must be integer to avoid overflow of word8 at 255
129 step :: Int -> IO (Maybe (Word8, Int))
129 step :: Int -> IO (Maybe (Word8, Int))
@@ -154,15 +154,15 @@ concurrentUnfoldrM eq op n =
154 -- since unfoldr happens in parallel with the stream processing we
154 -- since unfoldr happens in parallel with the stream processing we
155 -- can do two takeMVar in one iteration. If it is not parallel then
155 -- can do two takeMVar in one iteration. If it is not parallel then
156 -- this will not work and the test will fail.
156 -- this will not work and the test will fail.
157− A.toList $ do
157+ S.toList $ do
158 x <- op (sourceUnfoldrM mv n)
158 x <- op (sourceUnfoldrM mv n)
159 -- results may not be yielded in order, in case of
159 -- results may not be yielded in order, in case of
160 -- Async/WAsync/Parallel. So we use an increasing count
160 -- Async/WAsync/Parallel. So we use an increasing count
161 -- instead.
161 -- instead.
162− i <- A.yieldM $ readIORef cnt
162+ i <- S.yieldM $ readIORef cnt
163− A.yieldM $ modifyIORef cnt (+1)
163+ S.yieldM $ modifyIORef cnt (+1)
164 let msg = show i ++ "/" ++ show n
164 let msg = show i ++ "/" ++ show n
165− A.yieldM $ do
165+ S.yieldM $ do
166 if even i
166 if even i
167 then do
167 then do
168 dbgMVar ("first take concurrentUnfoldrM " ++ msg)
168 dbgMVar ("first take concurrentUnfoldrM " ++ msg)
@@ -187,9 +187,9 @@ concurrentApplication n =
187 -- since unfoldr happens in parallel with the stream processing we
187 -- since unfoldr happens in parallel with the stream processing we
188 -- can do two takeMVar in one iteration. If it is not parallel then
188 -- can do two takeMVar in one iteration. If it is not parallel then
189 -- this will not work and the test will fail.
189 -- this will not work and the test will fail.
190− A.toList $ do
190+ S.toList $ do
191 sourceUnfoldrM mv n |&
191 sourceUnfoldrM mv n |&
192− (A.mapM $ \x -> do
192+ (S.mapM $ \x -> do
193 let msg = show x ++ "/" ++ show n
193 let msg = show x ++ "/" ++ show n
194 if even x
194 if even x
195 then do
195 then do
@@ -204,7 +204,7 @@ concurrentApplication n =
204 equals (==) stream list
204 equals (==) stream list
205
205
206sourceUnfoldrM1 :: IsStream t => Word8 -> t IO Word8
206sourceUnfoldrM1 :: IsStream t => Word8 -> t IO Word8
207−sourceUnfoldrM1 n = A.unfoldrM step 0
207+sourceUnfoldrM1 n = S.unfoldrM step 0
208 where
208 where
209 -- argument must be integer to avoid overflow of word8 at 255
209 -- argument must be integer to avoid overflow of word8 at 255
210 step :: Int -> IO (Maybe (Word8, Int))
210 step :: Int -> IO (Maybe (Word8, Int))
@@ -219,7 +219,7 @@ concurrentFoldlApplication n =
219 -- XXX we should test empty list case as well
219 -- XXX we should test empty list case as well
220 let list = [0..n]
220 let list = [0..n]
221 stream <- run $ do
221 stream <- run $ do
222− sourceUnfoldrM1 n |&. A.foldlM' (\xs x -> return (x : xs)) []
222+ sourceUnfoldrM1 n |&. S.foldlM' (\xs x -> return (x : xs)) []
223 equals (==) (reverse stream) list
223 equals (==) (reverse stream) list
224
224
225concurrentFoldrApplication :: Word8 -> Property
225concurrentFoldrApplication :: Word8 -> Property
@@ -228,7 +228,7 @@ concurrentFoldrApplication n =
228 -- XXX we should test empty list case as well
228 -- XXX we should test empty list case as well
229 let list = [0..n]
229 let list = [0..n]
230 stream <- run $ do
230 stream <- run $ do
231− sourceUnfoldrM1 n |&. A.foldrM (\x xs -> return (x : xs)) []
231+ sourceUnfoldrM1 n |&. S.foldrM (\x xs -> return (x : xs)) []
232 equals (==) stream list
232 equals (==) stream list
233
233
234transformCombineFromList
234transformCombineFromList
@@ -244,7 +244,7 @@ transformCombineFromList
244 -> Property
244 -> Property
245transformCombineFromList constr eq listOp t op a b c =
245transformCombineFromList constr eq listOp t op a b c =
246 monadicIO $ do
246 monadicIO $ do
247− stream <- run ((A.toList . t) $
247+ stream <- run ((S.toList . t) $
248 constr a <> op (constr b <> constr c))
248 constr a <> op (constr b <> constr c))
249 let list = a <> listOp (b <> c)
249 let list = a <> listOp (b <> c)
250 equals eq stream list
250 equals eq stream list
@@ -305,42 +305,42 @@ transformOps constr desc t eq = do
305 let transform = transformFromList constr eq
305 let transform = transformFromList constr eq
306 -- Filtering
306 -- Filtering
307 prop (desc ++ " filter False") $
307 prop (desc ++ " filter False") $
308− transform (filter (const False)) $ t . (A.filter (const False))
308+ transform (filter (const False)) $ t . (S.filter (const False))
309 prop (desc ++ " filter True") $
309 prop (desc ++ " filter True") $
310− transform (filter (const True)) $ t . (A.filter (const True))
310+ transform (filter (const True)) $ t . (S.filter (const True))
311 prop (desc ++ " filter even") $
311 prop (desc ++ " filter even") $
312− transform (filter even) $ t . (A.filter even)
312+ transform (filter even) $ t . (S.filter even)
313
313
314 prop (desc ++ " take maxBound") $
314 prop (desc ++ " take maxBound") $
315− transform (take maxBound) $ t . (A.take maxBound)
315+ transform (take maxBound) $ t . (S.take maxBound)
316− prop (desc ++ " take 0") $ transform (take 0) $ t . (A.take 0)
316+ prop (desc ++ " take 0") $ transform (take 0) $ t . (S.take 0)
317− prop (desc ++ " take 1") $ transform (take 1) $ t . (A.take 1)
317+ prop (desc ++ " take 1") $ transform (take 1) $ t . (S.take 1)
318− prop (desc ++ " take 10") $ transform (take 10) $ t . (A.take 10)
318+ prop (desc ++ " take 10") $ transform (take 10) $ t . (S.take 10)
319
319
320 prop (desc ++ " takeWhile True") $
320 prop (desc ++ " takeWhile True") $
321− transform (takeWhile (const True)) $ t . (A.takeWhile (const True))
321+ transform (takeWhile (const True)) $ t . (S.takeWhile (const True))
322 prop (desc ++ " takeWhile False") $
322 prop (desc ++ " takeWhile False") $
323− transform (takeWhile (const False)) $ t . (A.takeWhile (const False))
323+ transform (takeWhile (const False)) $ t . (S.takeWhile (const False))
324 prop (desc ++ " takeWhile > 0") $
324 prop (desc ++ " takeWhile > 0") $
325− transform (takeWhile (> 0)) $ t . (A.takeWhile (> 0))
325+ transform (takeWhile (> 0)) $ t . (S.takeWhile (> 0))
326
326
327 let f x = if odd x then Just (x + 100) else Nothing
327 let f x = if odd x then Just (x + 100) else Nothing
328− prop (desc ++ " mapMaybe") $ transform (mapMaybe f) $ t . (A.mapMaybe f)
328+ prop (desc ++ " mapMaybe") $ transform (mapMaybe f) $ t . (S.mapMaybe f)
329
329
330 prop (desc ++ " drop maxBound") $
330 prop (desc ++ " drop maxBound") $
331− transform (drop maxBound) $ t . (A.drop maxBound)
331+ transform (drop maxBound) $ t . (S.drop maxBound)
332− prop (desc ++ " drop 0") $ transform (drop 0) $ t . (A.drop 0)
332+ prop (desc ++ " drop 0") $ transform (drop 0) $ t . (S.drop 0)
333− prop (desc ++ " drop 1") $ transform (drop 1) $ t . (A.drop 1)
333+ prop (desc ++ " drop 1") $ transform (drop 1) $ t . (S.drop 1)
334− prop (desc ++ " drop 10") $ transform (drop 10) $ t . (A.drop 10)
334+ prop (desc ++ " drop 10") $ transform (drop 10) $ t . (S.drop 10)
335
335
336 prop (desc ++ " dropWhile True") $
336 prop (desc ++ " dropWhile True") $
337− transform (dropWhile (const True)) $ t . (A.dropWhile (const True))
337+ transform (dropWhile (const True)) $ t . (S.dropWhile (const True))
338 prop (desc ++ " dropWhile False") $
338 prop (desc ++ " dropWhile False") $
339− transform (dropWhile (const False)) $ t . (A.dropWhile (const False))
339+ transform (dropWhile (const False)) $ t . (S.dropWhile (const False))
340 prop (desc ++ " dropWhile > 0") $
340 prop (desc ++ " dropWhile > 0") $
341− transform (dropWhile (> 0)) $ t . (A.dropWhile (> 0))
341+ transform (dropWhile (> 0)) $ t . (S.dropWhile (> 0))
342− prop (desc ++ " scan") $ transform (scanl' (+) 0) $ t . (A.scanl' (+) 0)
342+ prop (desc ++ " scan") $ transform (scanl' (+) 0) $ t . (S.scanl' (+) 0)
343− prop (desc ++ " reverse") $ transform reverse $ t . A.reverse
343+ prop (desc ++ " reverse") $ transform reverse $ t . S.reverse
344
344
345concurrentOps
345concurrentOps
346 :: IsStream t
346 :: IsStream t
@@ -362,7 +362,7 @@ concurrentOps constr desc t eq = do
362 -- then it will block even if it is concurrent.
362 -- then it will block even if it is concurrent.
363 prop (desc ++ " mapM") $ withMaxSuccess maxTestCount $
363 prop (desc ++ " mapM") $ withMaxSuccess maxTestCount $
364 concurrentMapM constr eq $ \n mv stream ->
364 concurrentMapM constr eq $ \n mv stream ->
365− t $ A.mapM (mvarSequenceOp mv n) stream
365+ t $ S.mapM (mvarSequenceOp mv n) stream
366
366
367-- XXX add tests for MonadReader and MonadError etc. In case an SVar is
367-- XXX add tests for MonadReader and MonadError etc. In case an SVar is
368-- accidentally passed through them.
368-- accidentally passed through them.
@@ -377,32 +377,32 @@ transformCombineOpsCommon constr desc t eq = do
377 let transform = transformCombineFromList constr eq
377 let transform = transformCombineFromList constr eq
378 -- Filtering
378 -- Filtering
379 prop (desc ++ " filter False") $
379 prop (desc ++ " filter False") $
380− transform (filter (const False)) t (A.filter (const False))
380+ transform (filter (const False)) t (S.filter (const False))
381 prop (desc ++ " filter True") $
381 prop (desc ++ " filter True") $
382− transform (filter (const True)) t (A.filter (const True))
382+ transform (filter (const True)) t (S.filter (const True))
383 prop (desc ++ " filter even") $
383 prop (desc ++ " filter even") $
384− transform (filter even) t (A.filter even)
384+ transform (filter even) t (S.filter even)
385
385
386 prop (desc ++ " take maxBound") $
386 prop (desc ++ " take maxBound") $
387− transform (take maxBound) t (A.take maxBound)
387+ transform (take maxBound) t (S.take maxBound)
388− prop (desc ++ " take 0") $ transform (take 0) t (A.take 0)
388+ prop (desc ++ " take 0") $ transform (take 0) t (S.take 0)
389
389
390 prop (desc ++ " takeWhile True") $
390 prop (desc ++ " takeWhile True") $
391− transform (takeWhile (const True)) t (A.takeWhile (const True))
391+ transform (takeWhile (const True)) t (S.takeWhile (const True))
392 prop (desc ++ " takeWhile False") $
392 prop (desc ++ " takeWhile False") $
393− transform (takeWhile (const False)) t (A.takeWhile (const False))
393+ transform (takeWhile (const False)) t (S.takeWhile (const False))
394
394
395 prop (desc ++ " drop maxBound") $
395 prop (desc ++ " drop maxBound") $
396− transform (drop maxBound) t (A.drop maxBound)
396+ transform (drop maxBound) t (S.drop maxBound)
397− prop (desc ++ " drop 0") $ transform (drop 0) t (A.drop 0)
397+ prop (desc ++ " drop 0") $ transform (drop 0) t (S.drop 0)
398
398
399 prop (desc ++ " dropWhile True") $
399 prop (desc ++ " dropWhile True") $
400− transform (dropWhile (const True)) t (A.dropWhile (const True))
400+ transform (dropWhile (const True)) t (S.dropWhile (const True))
401 prop (desc ++ " dropWhile False") $
401 prop (desc ++ " dropWhile False") $
402− transform (dropWhile (const False)) t (A.dropWhile (const False))
402+ transform (dropWhile (const False)) t (S.dropWhile (const False))
403 prop (desc ++ " scan") $ transform (scanl' (flip const) 0) t
403 prop (desc ++ " scan") $ transform (scanl' (flip const) 0) t
404− (A.scanl' (flip const) 0)
404+ (S.scanl' (flip const) 0)
405− prop (desc ++ " reverse") $ transform reverse t A.reverse
405+ prop (desc ++ " reverse") $ transform reverse t S.reverse
406
406
407transformCombineOpsOrdered
407transformCombineOpsOrdered
408 :: (IsStream t, Semigroup (t IO Int))
408 :: (IsStream t, Semigroup (t IO Int))
@@ -414,18 +414,18 @@ transformCombineOpsOrdered
414transformCombineOpsOrdered constr desc t eq = do
414transformCombineOpsOrdered constr desc t eq = do
415 let transform = transformCombineFromList constr eq
415 let transform = transformCombineFromList constr eq
416 -- Filtering
416 -- Filtering
417− prop (desc ++ " take 1") $ transform (take 1) t (A.take 1)
417+ prop (desc ++ " take 1") $ transform (take 1) t (S.take 1)
418− prop (desc ++ " take 10") $ transform (take 10) t (A.take 10)
418+ prop (desc ++ " take 10") $ transform (take 10) t (S.take 10)
419
419
420 prop (desc ++ " takeWhile > 0") $
420 prop (desc ++ " takeWhile > 0") $
421− transform (takeWhile (> 0)) t (A.takeWhile (> 0))
421+ transform (takeWhile (> 0)) t (S.takeWhile (> 0))
422
422
423− prop (desc ++ " drop 1") $ transform (drop 1) t (A.drop 1)
423+ prop (desc ++ " drop 1") $ transform (drop 1) t (S.drop 1)
424− prop (desc ++ " drop 10") $ transform (drop 10) t (A.drop 10)
424+ prop (desc ++ " drop 10") $ transform (drop 10) t (S.drop 10)
425
425
426 prop (desc ++ " dropWhile > 0") $
426 prop (desc ++ " dropWhile > 0") $
427− transform (dropWhile (> 0)) t (A.dropWhile (> 0))
427+ transform (dropWhile (> 0)) t (S.dropWhile (> 0))
428− prop (desc ++ " scan") $ transform (scanl' (+) 0) t (A.scanl' (+) 0)
428+ prop (desc ++ " scan") $ transform (scanl' (+) 0) t (S.scanl' (+) 0)
429
429
430wrapMaybe :: Eq a1 => ([a1] -> a2) -> [a1] -> Maybe a2
430wrapMaybe :: Eq a1 => ([a1] -> a2) -> [a1] -> Maybe a2
431wrapMaybe f =
431wrapMaybe f =
@@ -441,17 +441,17 @@ eliminationOps
441 -> Spec
441 -> Spec
442eliminationOps constr desc t = do
442eliminationOps constr desc t = do
443 -- Elimination
443 -- Elimination
444− prop (desc ++ " null") $ eliminateOp constr null $ A.null . t
444+ prop (desc ++ " null") $ eliminateOp constr null $ S.null . t
445 prop (desc ++ " foldl") $
445 prop (desc ++ " foldl") $
446− eliminateOp constr (foldl' (+) 0) $ (A.foldl' (+) 0) . t
446+ eliminateOp constr (foldl' (+) 0) $ (S.foldl' (+) 0) . t
447− prop (desc ++ " all") $ eliminateOp constr (all even) $ (A.all even) . t
447+ prop (desc ++ " all") $ eliminateOp constr (all even) $ (S.all even) . t
448− prop (desc ++ " any") $ eliminateOp constr (any even) $ (A.any even) . t
448+ prop (desc ++ " any") $ eliminateOp constr (any even) $ (S.any even) . t
449− prop (desc ++ " length") $ eliminateOp constr length $ A.length . t
449+ prop (desc ++ " length") $ eliminateOp constr length $ S.length . t
450− prop (desc ++ " sum") $ eliminateOp constr sum $ A.sum . t
450+ prop (desc ++ " sum") $ eliminateOp constr sum $ S.sum . t
451− prop (desc ++ " product") $ eliminateOp constr product $ A.product . t
451+ prop (desc ++ " product") $ eliminateOp constr product $ S.product . t
452
452
453− prop (desc ++ " maximum") $ eliminateOp constr (wrapMaybe maximum) $ A.maximum . t
453+ prop (desc ++ " maximum") $ eliminateOp constr (wrapMaybe maximum) $ S.maximum . t
454− prop (desc ++ " minimum") $ eliminateOp constr (wrapMaybe minimum) $ A.minimum . t
454+ prop (desc ++ " minimum") $ eliminateOp constr (wrapMaybe minimum) $ S.minimum . t
455
455
456-- head/tail/last may depend on the order in case of parallel streams
456-- head/tail/last may depend on the order in case of parallel streams
457-- so we test these only for serial streams.
457-- so we test these only for serial streams.
@@ -461,13 +461,13 @@ serialEliminationOps
461 -> (t IO Int -> SerialT IO Int)
461 -> (t IO Int -> SerialT IO Int)
462 -> Spec
462 -> Spec
463serialEliminationOps constr desc t = do
463serialEliminationOps constr desc t = do
464− prop (desc ++ " head") $ eliminateOp constr (wrapMaybe head) $ A.head . t
464+ prop (desc ++ " head") $ eliminateOp constr (wrapMaybe head) $ S.head . t
465 prop (desc ++ " tail") $ eliminateOp constr (wrapMaybe tail) $ \x -> do
465 prop (desc ++ " tail") $ eliminateOp constr (wrapMaybe tail) $ \x -> do
466− r <- A.tail (t x)
466+ r <- S.tail (t x)
467 case r of
467 case r of
468 Nothing -> return Nothing
468 Nothing -> return Nothing
469− Just s -> A.toList s >>= return . Just
469+ Just s -> S.toList s >>= return . Just
470− prop (desc ++ " last") $ eliminateOp constr (wrapMaybe last) $ A.last . t
470+ prop (desc ++ " last") $ eliminateOp constr (wrapMaybe last) $ S.last . t
471
471
472transformOpsWord8
472transformOpsWord8
473 :: ([Word8] -> t IO Word8)
473 :: ([Word8] -> t IO Word8)
@@ -475,8 +475,8 @@ transformOpsWord8
475 -> (t IO Word8 -> SerialT IO Word8)
475 -> (t IO Word8 -> SerialT IO Word8)
476 -> Spec
476 -> Spec
477transformOpsWord8 constr desc t = do
477transformOpsWord8 constr desc t = do
478− prop (desc ++ " elem") $ elemOp constr t A.elem elem
478+ prop (desc ++ " elem") $ elemOp constr t S.elem elem
479− prop (desc ++ " elem") $ elemOp constr t A.notElem notElem
479+ prop (desc ++ " elem") $ elemOp constr t S.notElem notElem
480
480
481-- XXX concatenate streams of multiple elements rather than single elements
481-- XXX concatenate streams of multiple elements rather than single elements
482semigroupOps
482semigroupOps
@@ -503,7 +503,7 @@ applicativeOps
503 -> Property
503 -> Property
504applicativeOps constr t eq (a, b) = withMaxSuccess maxTestCount $
504applicativeOps constr t eq (a, b) = withMaxSuccess maxTestCount $
505 monadicIO $ do
505 monadicIO $ do
506− stream <- run ((A.toList . t) ((,) <$> (constr a) <*> (constr b)))
506+ stream <- run ((S.toList . t) ((,) <$> (constr a) <*> (constr b)))
507 let list = (,) <$> a <*> b
507 let list = (,) <$> a <*> b
508 equals eq stream list
508 equals eq stream list
509
509
@@ -516,9 +516,9 @@ zipApplicative
516 -> Property
516 -> Property
517zipApplicative constr t eq (a, b) = withMaxSuccess maxTestCount $
517zipApplicative constr t eq (a, b) = withMaxSuccess maxTestCount $
518 monadicIO $ do
518 monadicIO $ do
519− stream1 <- run ((A.toList . t) ((,) <$> (constr a) <*> (constr b)))
519+ stream1 <- run ((S.toList . t) ((,) <$> (constr a) <*> (constr b)))
520− stream2 <- run ((A.toList . t) (pure (,) <*> (constr a) <*> (constr b)))
520+ stream2 <- run ((S.toList . t) (pure (,) <*> (constr a) <*> (constr b)))
521− stream3 <- run ((A.toList . t) (A.zipWith (,) (constr a) (constr b)))
521+ stream3 <- run ((S.toList . t) (S.zipWith (,) (constr a) (constr b)))
522 let list = getZipList $ (,) <$> ZipList a <*> ZipList b
522 let list = getZipList $ (,) <$> ZipList a <*> ZipList b
523 equals eq stream1 list
523 equals eq stream1 list
524 equals eq stream2 list
524 equals eq stream2 list
@@ -535,12 +535,12 @@ zipMonadic constr t eq (a, b) = withMaxSuccess maxTestCount $
535 monadicIO $ do
535 monadicIO $ do
536 stream1 <-
536 stream1 <-
537 run
537 run
538− ((A.toList . t)
538+ ((S.toList . t)
539− (A.zipWithM (\x y -> return (x, y)) (constr a) (constr b)))
539+ (S.zipWithM (\x y -> return (x, y)) (constr a) (constr b)))
540 stream2 <-
540 stream2 <-
541 run
541 run
542− ((A.toList . t)
542+ ((S.toList . t)
543− (A.zipAsyncWithM (\x y -> return (x, y)) (constr a) (constr b)))
543+ (S.zipAsyncWithM (\x y -> return (x, y)) (constr a) (constr b)))
544 let list = getZipList $ (,) <$> ZipList a <*> ZipList b
544 let list = getZipList $ (,) <$> ZipList a <*> ZipList b
545 equals eq stream1 list
545 equals eq stream1 list
546 equals eq stream2 list
546 equals eq stream2 list
@@ -553,7 +553,7 @@ monadThen
553 -> ([Int], [Int])
553 -> ([Int], [Int])
554 -> Property
554 -> Property
555monadThen constr t eq (a, b) = withMaxSuccess maxTestCount $ monadicIO $ do
555monadThen constr t eq (a, b) = withMaxSuccess maxTestCount $ monadicIO $ do
556− stream <- run ((A.toList . t) ((constr a) >> (constr b)))
556+ stream <- run ((S.toList . t) ((constr a) >> (constr b)))
557 let list = a >> b
557 let list = a >> b
558 equals eq stream list
558 equals eq stream list
559
559
@@ -568,7 +568,7 @@ monadBind constr t eq (a, b) = withMaxSuccess maxTestCount $
568 monadicIO $ do
568 monadicIO $ do
569 stream <-
569 stream <-
570 run
570 run
571− ((A.toList . t)
571+ ((S.toList . t)
572 ((constr a) >>= \x -> (constr b) >>= return . (+ x)))
572 ((constr a) >>= \x -> (constr b) >>= return . (+ x)))
573 let list = a >>= \x -> b >>= return . (+ x)
573 let list = a >>= \x -> b >>= return . (+ x)
574 equals eq stream list
574 equals eq stream list
@@ -585,30 +585,30 @@ main = hspec $ do
585 -- XXX test for all types of streams
585 -- XXX test for all types of streams
586 prop "serially replicateM" $ constructWithReplicateM serially
586 prop "serially replicateM" $ constructWithReplicateM serially
587 it "iterate" $
587 it "iterate" $
588− (A.toList . serially . (A.take 100) $ (A.iterate (+ 1) (0 :: Int)))
588+ (S.toList . serially . (S.take 100) $ (S.iterate (+ 1) (0 :: Int)))
589 `shouldReturn` (take 100 $ iterate (+ 1) 0)
589 `shouldReturn` (take 100 $ iterate (+ 1) 0)
590
590
591 it "iterateM" $ do
591 it "iterateM" $ do
592 let addM = (\ y -> return (y + 1))
592 let addM = (\ y -> return (y + 1))
593− A.toList . serially . (A.take 100) $ A.iterateM addM (0 :: Int)
593+ S.toList . serially . (S.take 100) $ S.iterateM addM (0 :: Int)
594 `shouldReturn` (take 100 $ iterate (+ 1) 0)
594 `shouldReturn` (take 100 $ iterate (+ 1) 0)
595
595
596 describe "Functor operations" $ do
596 describe "Functor operations" $ do
597− functorOps A.fromFoldable "serially" serially (==)
597+ functorOps S.fromFoldable "serially" serially (==)
598 functorOps folded "serially folded" serially (==)
598 functorOps folded "serially folded" serially (==)
599− functorOps A.fromFoldable "wSerially" wSerially (==)
599+ functorOps S.fromFoldable "wSerially" wSerially (==)
600 functorOps folded "wSerially folded" wSerially (==)
600 functorOps folded "wSerially folded" wSerially (==)
601− functorOps A.fromFoldable "aheadly" aheadly (==)
601+ functorOps S.fromFoldable "aheadly" aheadly (==)
602 functorOps folded "aheadly folded" aheadly (==)
602 functorOps folded "aheadly folded" aheadly (==)
603− functorOps A.fromFoldable "asyncly" asyncly sortEq
603+ functorOps S.fromFoldable "asyncly" asyncly sortEq
604 functorOps folded "asyncly folded" asyncly sortEq
604 functorOps folded "asyncly folded" asyncly sortEq
605− functorOps A.fromFoldable "wAsyncly" wAsyncly sortEq
605+ functorOps S.fromFoldable "wAsyncly" wAsyncly sortEq
606 functorOps folded "wAsyncly folded" wAsyncly sortEq
606 functorOps folded "wAsyncly folded" wAsyncly sortEq
607− functorOps A.fromFoldable "parallely" parallely sortEq
607+ functorOps S.fromFoldable "parallely" parallely sortEq
608 functorOps folded "parallely folded" parallely sortEq
608 functorOps folded "parallely folded" parallely sortEq
609− functorOps A.fromFoldable "zipSerially" zipSerially (==)
609+ functorOps S.fromFoldable "zipSerially" zipSerially (==)
610 functorOps folded "zipSerially folded" zipSerially (==)
610 functorOps folded "zipSerially folded" zipSerially (==)
611− functorOps A.fromFoldable "zipAsyncly" zipAsyncly (==)
611+ functorOps S.fromFoldable "zipAsyncly" zipAsyncly (==)
612 functorOps folded "zipAsyncly folded" zipAsyncly (==)
612 functorOps folded "zipAsyncly folded" zipAsyncly (==)
613
613
614 describe "Semigroup operations" $ do
614 describe "Semigroup operations" $ do
@@ -625,43 +625,43 @@ main = hspec $ do
625 -- The tests using sorted equality are weaker tests
625 -- The tests using sorted equality are weaker tests
626 -- We need to have stronger unit tests for all those
626 -- We need to have stronger unit tests for all those
627 -- XXX applicative with three arguments
627 -- XXX applicative with three arguments
628− prop "serially applicative" $ applicativeOps A.fromFoldable serially (==)
628+ prop "serially applicative" $ applicativeOps S.fromFoldable serially (==)
629 prop "serially applicative folded" $ applicativeOps folded serially (==)
629 prop "serially applicative folded" $ applicativeOps folded serially (==)
630− prop "aheadly applicative" $ applicativeOps A.fromFoldable aheadly (==)
630+ prop "aheadly applicative" $ applicativeOps S.fromFoldable aheadly (==)
631 prop "aheadly applicative folded" $ applicativeOps folded aheadly (==)
631 prop "aheadly applicative folded" $ applicativeOps folded aheadly (==)
632− prop "wSerially applicative" $ applicativeOps A.fromFoldable wSerially sortEq
632+ prop "wSerially applicative" $ applicativeOps S.fromFoldable wSerially sortEq
633 prop "wSerially applicative folded" $ applicativeOps folded wSerially sortEq
633 prop "wSerially applicative folded" $ applicativeOps folded wSerially sortEq
634− prop "asyncly applicative" $ applicativeOps A.fromFoldable asyncly sortEq
634+ prop "asyncly applicative" $ applicativeOps S.fromFoldable asyncly sortEq
635 prop "asyncly applicative folded" $ applicativeOps folded asyncly sortEq
635 prop "asyncly applicative folded" $ applicativeOps folded asyncly sortEq
636 prop "wAsyncly applicative folded" $ applicativeOps folded wAsyncly sortEq
636 prop "wAsyncly applicative folded" $ applicativeOps folded wAsyncly sortEq
637 prop "parallely applicative folded" $ applicativeOps folded parallely sortEq
637 prop "parallely applicative folded" $ applicativeOps folded parallely sortEq
638
638
639 describe "Zip operations" $ do
639 describe "Zip operations" $ do
640− prop "zipSerially applicative" $ zipApplicative A.fromFoldable zipSerially (==)
640+ prop "zipSerially applicative" $ zipApplicative S.fromFoldable zipSerially (==)
641 prop "zipSerially applicative folded" $ zipApplicative folded zipSerially (==)
641 prop "zipSerially applicative folded" $ zipApplicative folded zipSerially (==)
642− prop "zipAsyncly applicative" $ zipApplicative A.fromFoldable zipAsyncly (==)
642+ prop "zipAsyncly applicative" $ zipApplicative S.fromFoldable zipAsyncly (==)
643 prop "zipAsyncly applicative folded" $ zipApplicative folded zipAsyncly (==)
643 prop "zipAsyncly applicative folded" $ zipApplicative folded zipAsyncly (==)
644
644
645− prop "zip monadic serially" $ zipMonadic A.fromFoldable serially (==)
645+ prop "zip monadic serially" $ zipMonadic S.fromFoldable serially (==)
646 prop "zip monadic serially folded" $ zipMonadic folded serially (==)
646 prop "zip monadic serially folded" $ zipMonadic folded serially (==)
647− prop "zip monadic aheadly" $ zipMonadic A.fromFoldable aheadly (==)
647+ prop "zip monadic aheadly" $ zipMonadic S.fromFoldable aheadly (==)
648 prop "zip monadic aheadly folded" $ zipMonadic folded aheadly (==)
648 prop "zip monadic aheadly folded" $ zipMonadic folded aheadly (==)
649− prop "zip monadic wSerially" $ zipMonadic A.fromFoldable wSerially (==)
649+ prop "zip monadic wSerially" $ zipMonadic S.fromFoldable wSerially (==)
650 prop "zip monadic wSerially folded" $ zipMonadic folded wSerially (==)
650 prop "zip monadic wSerially folded" $ zipMonadic folded wSerially (==)
651− prop "zip monadic asyncly" $ zipMonadic A.fromFoldable asyncly (==)
651+ prop "zip monadic asyncly" $ zipMonadic S.fromFoldable asyncly (==)
652 prop "zip monadic asyncly folded" $ zipMonadic folded asyncly (==)
652 prop "zip monadic asyncly folded" $ zipMonadic folded asyncly (==)
653− prop "zip monadic wAsyncly" $ zipMonadic A.fromFoldable wAsyncly (==)
653+ prop "zip monadic wAsyncly" $ zipMonadic S.fromFoldable wAsyncly (==)
654 prop "zip monadic wAsyncly folded" $ zipMonadic folded wAsyncly (==)
654 prop "zip monadic wAsyncly folded" $ zipMonadic folded wAsyncly (==)
655− prop "zip monadic parallely" $ zipMonadic A.fromFoldable parallely (==)
655+ prop "zip monadic parallely" $ zipMonadic S.fromFoldable parallely (==)
656 prop "zip monadic parallely folded" $ zipMonadic folded parallely (==)
656 prop "zip monadic parallely folded" $ zipMonadic folded parallely (==)
657
657
658 describe "Monad operations" $ do
658 describe "Monad operations" $ do
659− prop "serially monad then" $ monadThen A.fromFoldable serially (==)
659+ prop "serially monad then" $ monadThen S.fromFoldable serially (==)
660− prop "aheadly monad then" $ monadThen A.fromFoldable aheadly (==)
660+ prop "aheadly monad then" $ monadThen S.fromFoldable aheadly (==)
661− prop "wSerially monad then" $ monadThen A.fromFoldable wSerially sortEq
661+ prop "wSerially monad then" $ monadThen S.fromFoldable wSerially sortEq
662− prop "asyncly monad then" $ monadThen A.fromFoldable asyncly sortEq
662+ prop "asyncly monad then" $ monadThen S.fromFoldable asyncly sortEq
663− prop "wAsyncly monad then" $ monadThen A.fromFoldable wAsyncly sortEq
663+ prop "wAsyncly monad then" $ monadThen S.fromFoldable wAsyncly sortEq
664− prop "parallely monad then" $ monadThen A.fromFoldable parallely sortEq
664+ prop "parallely monad then" $ monadThen S.fromFoldable parallely sortEq
665
665
666 prop "serially monad then folded" $ monadThen folded serially (==)
666 prop "serially monad then folded" $ monadThen folded serially (==)
667 prop "aheadly monad then folded" $ monadThen folded aheadly (==)
667 prop "aheadly monad then folded" $ monadThen folded aheadly (==)
@@ -670,22 +670,22 @@ main = hspec $ do
670 prop "wAsyncly monad then folded" $ monadThen folded wAsyncly sortEq
670 prop "wAsyncly monad then folded" $ monadThen folded wAsyncly sortEq
671 prop "parallely monad then folded" $ monadThen folded parallely sortEq
671 prop "parallely monad then folded" $ monadThen folded parallely sortEq
672
672
673− prop "serially monad bind" $ monadBind A.fromFoldable serially (==)
673+ prop "serially monad bind" $ monadBind S.fromFoldable serially (==)
674− prop "aheadly monad bind" $ monadBind A.fromFoldable aheadly (==)
674+ prop "aheadly monad bind" $ monadBind S.fromFoldable aheadly (==)
675− prop "wSerially monad bind" $ monadBind A.fromFoldable wSerially sortEq
675+ prop "wSerially monad bind" $ monadBind S.fromFoldable wSerially sortEq
676− prop "asyncly monad bind" $ monadBind A.fromFoldable asyncly sortEq
676+ prop "asyncly monad bind" $ monadBind S.fromFoldable asyncly sortEq
677− prop "wAsyncly monad bind" $ monadBind A.fromFoldable wAsyncly sortEq
677+ prop "wAsyncly monad bind" $ monadBind S.fromFoldable wAsyncly sortEq
678− prop "parallely monad bind" $ monadBind A.fromFoldable parallely sortEq
678+ prop "parallely monad bind" $ monadBind S.fromFoldable parallely sortEq
679
679
680 describe "Stream transform operations" $ do
680 describe "Stream transform operations" $ do
681− transformOps A.fromFoldable "serially" serially (==)
681+ transformOps S.fromFoldable "serially" serially (==)
682− transformOps A.fromFoldable "aheadly" aheadly (==)
682+ transformOps S.fromFoldable "aheadly" aheadly (==)
683− transformOps A.fromFoldable "wSerially" wSerially (==)
683+ transformOps S.fromFoldable "wSerially" wSerially (==)
684− transformOps A.fromFoldable "zipSerially" zipSerially (==)
684+ transformOps S.fromFoldable "zipSerially" zipSerially (==)
685− transformOps A.fromFoldable "zipAsyncly" zipAsyncly (==)
685+ transformOps S.fromFoldable "zipAsyncly" zipAsyncly (==)
686− transformOps A.fromFoldable "asyncly" asyncly sortEq
686+ transformOps S.fromFoldable "asyncly" asyncly sortEq
687− transformOps A.fromFoldable "wAsyncly" wAsyncly sortEq
687+ transformOps S.fromFoldable "wAsyncly" wAsyncly sortEq
688− transformOps A.fromFoldable "parallely" parallely sortEq
688+ transformOps S.fromFoldable "parallely" parallely sortEq
689
689
690 transformOps folded "serially folded" serially (==)
690 transformOps folded "serially folded" serially (==)
691 transformOps folded "aheadly folded" aheadly (==)
691 transformOps folded "aheadly folded" aheadly (==)
@@ -696,14 +696,14 @@ main = hspec $ do
696 transformOps folded "wAsyncly folded" wAsyncly sortEq
696 transformOps folded "wAsyncly folded" wAsyncly sortEq
697 transformOps folded "parallely folded" parallely sortEq
697 transformOps folded "parallely folded" parallely sortEq
698
698
699− transformOpsWord8 A.fromFoldable "serially" serially
699+ transformOpsWord8 S.fromFoldable "serially" serially
700− transformOpsWord8 A.fromFoldable "aheadly" aheadly
700+ transformOpsWord8 S.fromFoldable "aheadly" aheadly
701− transformOpsWord8 A.fromFoldable "wSerially" wSerially
701+ transformOpsWord8 S.fromFoldable "wSerially" wSerially
702− transformOpsWord8 A.fromFoldable "zipSerially" zipSerially
702+ transformOpsWord8 S.fromFoldable "zipSerially" zipSerially
703− transformOpsWord8 A.fromFoldable "zipAsyncly" zipAsyncly
703+ transformOpsWord8 S.fromFoldable "zipAsyncly" zipAsyncly
704− transformOpsWord8 A.fromFoldable "asyncly" asyncly
704+ transformOpsWord8 S.fromFoldable "asyncly" asyncly
705− transformOpsWord8 A.fromFoldable "wAsyncly" wAsyncly
705+ transformOpsWord8 S.fromFoldable "wAsyncly" wAsyncly
706− transformOpsWord8 A.fromFoldable "parallely" parallely
706+ transformOpsWord8 S.fromFoldable "parallely" parallely
707
707
708 transformOpsWord8 folded "serially folded" serially
708 transformOpsWord8 folded "serially folded" serially
709 transformOpsWord8 folded "aheadly folded" aheadly
709 transformOpsWord8 folded "aheadly folded" aheadly
@@ -716,10 +716,10 @@ main = hspec $ do
716
716
717 -- XXX add tests with outputQueue size set to 1
717 -- XXX add tests with outputQueue size set to 1
718 describe "Stream concurrent operations" $ do
718 describe "Stream concurrent operations" $ do
719− concurrentOps A.fromFoldable "aheadly" aheadly (==)
719+ concurrentOps S.fromFoldable "aheadly" aheadly (==)
720− concurrentOps A.fromFoldable "asyncly" asyncly sortEq
720+ concurrentOps S.fromFoldable "asyncly" asyncly sortEq
721− concurrentOps A.fromFoldable "wAsyncly" wAsyncly sortEq
721+ concurrentOps S.fromFoldable "wAsyncly" wAsyncly sortEq
722− concurrentOps A.fromFoldable "parallely" parallely sortEq
722+ concurrentOps S.fromFoldable "parallely" parallely sortEq
723
723
724 concurrentOps folded "aheadly folded" aheadly (==)
724 concurrentOps folded "aheadly folded" aheadly (==)
725 concurrentOps folded "asyncly folded" asyncly sortEq
725 concurrentOps folded "asyncly folded" asyncly sortEq
@@ -736,14 +736,14 @@ main = hspec $ do
736 -- These tests are specifically targeted towards detecting illegal sharing
736 -- These tests are specifically targeted towards detecting illegal sharing
737 -- of SVar across conurrent streams.
737 -- of SVar across conurrent streams.
738 describe "Stream transform and combine operations" $ do
738 describe "Stream transform and combine operations" $ do
739− transformCombineOpsCommon A.fromFoldable "serially" serially (==)
739+ transformCombineOpsCommon S.fromFoldable "serially" serially (==)
740− transformCombineOpsCommon A.fromFoldable "aheadly" aheadly (==)
740+ transformCombineOpsCommon S.fromFoldable "aheadly" aheadly (==)
741− transformCombineOpsCommon A.fromFoldable "wSerially" wSerially sortEq
741+ transformCombineOpsCommon S.fromFoldable "wSerially" wSerially sortEq
742− transformCombineOpsCommon A.fromFoldable "zipSerially" zipSerially (==)
742+ transformCombineOpsCommon S.fromFoldable "zipSerially" zipSerially (==)
743− transformCombineOpsCommon A.fromFoldable "zipAsyncly" zipAsyncly (==)
743+ transformCombineOpsCommon S.fromFoldable "zipAsyncly" zipAsyncly (==)
744− transformCombineOpsCommon A.fromFoldable "asyncly" asyncly sortEq
744+ transformCombineOpsCommon S.fromFoldable "asyncly" asyncly sortEq
745− transformCombineOpsCommon A.fromFoldable "wAsyncly" wAsyncly sortEq
745+ transformCombineOpsCommon S.fromFoldable "wAsyncly" wAsyncly sortEq
746− transformCombineOpsCommon A.fromFoldable "parallely" parallely sortEq
746+ transformCombineOpsCommon S.fromFoldable "parallely" parallely sortEq
747
747
748 transformCombineOpsCommon folded "serially" serially (==)
748 transformCombineOpsCommon folded "serially" serially (==)
749 transformCombineOpsCommon folded "aheadly" aheadly (==)
749 transformCombineOpsCommon folded "aheadly" aheadly (==)
@@ -754,20 +754,20 @@ main = hspec $ do
754 transformCombineOpsCommon folded "wAsyncly" wAsyncly sortEq
754 transformCombineOpsCommon folded "wAsyncly" wAsyncly sortEq
755 transformCombineOpsCommon folded "parallely" parallely sortEq
755 transformCombineOpsCommon folded "parallely" parallely sortEq
756
756
757− transformCombineOpsOrdered A.fromFoldable "serially" serially (==)
757+ transformCombineOpsOrdered S.fromFoldable "serially" serially (==)
758− transformCombineOpsOrdered A.fromFoldable "serially" aheadly (==)
758+ transformCombineOpsOrdered S.fromFoldable "serially" aheadly (==)
759− transformCombineOpsOrdered A.fromFoldable "zipSerially" zipSerially (==)
759+ transformCombineOpsOrdered S.fromFoldable "zipSerially" zipSerially (==)
760− transformCombineOpsOrdered A.fromFoldable "zipAsyncly" zipAsyncly (==)
760+ transformCombineOpsOrdered S.fromFoldable "zipAsyncly" zipAsyncly (==)
761
761
762 describe "Stream elimination operations" $ do
762 describe "Stream elimination operations" $ do
763− eliminationOps A.fromFoldable "serially" serially
763+ eliminationOps S.fromFoldable "serially" serially
764− eliminationOps A.fromFoldable "aheadly" aheadly
764+ eliminationOps S.fromFoldable "aheadly" aheadly
765− eliminationOps A.fromFoldable "wSerially" wSerially
765+ eliminationOps S.fromFoldable "wSerially" wSerially
766− eliminationOps A.fromFoldable "zipSerially" zipSerially
766+ eliminationOps S.fromFoldable "zipSerially" zipSerially
767− eliminationOps A.fromFoldable "zipAsyncly" zipAsyncly
767+ eliminationOps S.fromFoldable "zipAsyncly" zipAsyncly
768− eliminationOps A.fromFoldable "asyncly" asyncly
768+ eliminationOps S.fromFoldable "asyncly" asyncly
769− eliminationOps A.fromFoldable "wAsyncly" wAsyncly
769+ eliminationOps S.fromFoldable "wAsyncly" wAsyncly
770− eliminationOps A.fromFoldable "parallely" parallely
770+ eliminationOps S.fromFoldable "parallely" parallely
771
771
772 eliminationOps folded "serially folded" serially
772 eliminationOps folded "serially folded" serially
773 eliminationOps folded "aheadly folded" aheadly
773 eliminationOps folded "aheadly folded" aheadly
@@ -779,11 +779,11 @@ main = hspec $ do
779 eliminationOps folded "parallely folded" parallely
779 eliminationOps folded "parallely folded" parallely
780
780
781 describe "Stream serial elimination operations" $ do
781 describe "Stream serial elimination operations" $ do
782− serialEliminationOps A.fromFoldable "serially" serially
782+ serialEliminationOps S.fromFoldable "serially" serially
783− serialEliminationOps A.fromFoldable "aheadly" aheadly
783+ serialEliminationOps S.fromFoldable "aheadly" aheadly
784− serialEliminationOps A.fromFoldable "wSerially" wSerially
784+ serialEliminationOps S.fromFoldable "wSerially" wSerially
785− serialEliminationOps A.fromFoldable "zipSerially" zipSerially
785+ serialEliminationOps S.fromFoldable "zipSerially" zipSerially
786− serialEliminationOps A.fromFoldable "zipAsyncly" zipAsyncly
786+ serialEliminationOps S.fromFoldable "zipAsyncly" zipAsyncly
787
787
788 serialEliminationOps folded "serially folded" serially
788 serialEliminationOps folded "serially folded" serially
789 serialEliminationOps folded "aheadly folded" aheadly
789 serialEliminationOps folded "aheadly folded" aheadly