on master help sign in
rename some qualified imports
commitb856396e14541944e633a719b302f255555b77af authorHarendra Kumar <harendra.kumar@gmail.com> dateSat 23 Jun 2018, 07:41 (8 years ago) parent266148c
3 files changed+217−217
src/Streamly/Streams/Serial.hs+2−2 test/Main.hs+54−54 test/Prop.hs+161−161
src/Streamly/Streams/Serial.hs+2−2
@@ -53,7 +53,7 @@ import Control.Monad.Trans.Class (MonadTrans(lift))
5353import Data.Semigroup (Semigroup(..))
5454
5555import Streamly.Streams.StreamK hiding (serial)
56−import qualified Streamly.Streams.StreamK as C
56+import qualified Streamly.Streams.StreamK as K
5757
5858#include "Instances.hs"
5959
@@ -162,7 +162,7 @@ instance IsStream SerialT where
162162-- @since 0.2.0
163163{-# INLINE serial #-}
164164serial :: 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)
166166
167167------------------------------------------------------------------------------
168168-- Monad
test/Main.hs+54−54
@@ -15,22 +15,22 @@ import Test.Hspec
1515
1616import Streamly
1717import Streamly.Prelude ((.:), nil)
18−import qualified Streamly.Prelude as A
18+import qualified Streamly.Prelude as S
1919
2020singleton :: IsStream t => a -> t m a
2121singleton a = a .: nil
2222
2323toListSerial :: SerialT IO a -> IO [a]
24−toListSerial = A.toList . serially
24+toListSerial = S.toList . serially
2525
2626toListInterleaved :: WSerialT IO a -> IO [a]
27−toListInterleaved = A.toList . wSerially
27+toListInterleaved = S.toList . wSerially
2828
2929toListAsync :: AsyncT IO a -> IO [a]
30−toListAsync = A.toList . asyncly
30+toListAsync = S.toList . asyncly
3131
3232toListParallel :: WAsyncT IO a -> IO [a]
33−toListParallel = A.toList . wAsyncly
33+toListParallel = S.toList . wAsyncly
3434
3535main :: IO ()
3636main = hspec $ do
@@ -40,7 +40,7 @@ main = hspec $ do
4040 it "simple serially" $
4141 (runStream . serially) (return (0 :: Int)) `shouldReturn` ()
4242 it "simple serially with IO" $
43− (runStream . serially) (A.yieldM $ putStrLn "hello") `shouldReturn` ()
43+ (runStream . serially) (S.yieldM $ putStrLn "hello") `shouldReturn` ()
4444
4545 describe "Empty" $ do
4646 it "Monoid - mempty" $
@@ -177,7 +177,7 @@ main = hspec $ do
177177 `shouldReturn` ([4,4,8,8,0,0,2,2])
178178 -}
179179 it "Nest <|>, <>, <|> (2)" $
180− (A.toList . wAsyncly) (
180+ (S.toList . wAsyncly) (
181181 s (p (t 4 <> t 8) <> p (t 1 <> t 2))
182182 <> s (p (t 4 <> t 8) <> p (t 1 <> t 2)))
183183 `shouldReturn` ([4,4,8,8,1,1,2,2])
@@ -198,7 +198,7 @@ main = hspec $ do
198198 `shouldReturn` ([4,4,1,1,8,2,9,2])
199199 -}
200200 it "Nest <|>, <|>, <|>" $
201− (A.toList . wAsyncly) (
201+ (S.toList . wAsyncly) (
202202 ((t 4 <> t 8) <> (t 0 <> t 2))
203203 <> ((t 4 <> t 8) <> (t 0 <> t 2)))
204204 `shouldReturn` ([0,0,2,2,4,4,8,8])
@@ -381,12 +381,12 @@ main = hspec $ do
381381
382382 it "asyncly crosses thread limit (2000 threads)" $
383383 runStream (asyncly $ fold $
384− replicate 2000 $ A.yieldM $ threadDelay 1000000)
384+ replicate 2000 $ S.yieldM $ threadDelay 1000000)
385385 `shouldReturn` ()
386386
387387 it "aheadly crosses thread limit (4000 threads)" $
388388 runStream (aheadly $ fold $
389− replicate 4000 $ A.yieldM $ threadDelay 1000000)
389+ replicate 4000 $ S.yieldM $ threadDelay 1000000)
390390 `shouldReturn` ()
391391
392392-- XXX need to test that we have promptly cleaned up everything after the error
@@ -421,10 +421,10 @@ composeWithMonadThrow
421421 => (t IO Int -> SerialT IO Int) -> Spec
422422composeWithMonadThrow t = do
423423 it "Compose throwM, nil" $
424− (try $ tl (throwM (ExampleException "E") <> A.nil))
424+ (try $ tl (throwM (ExampleException "E") <> S.nil))
425425 `shouldReturn` (Left (ExampleException "E") :: Either ExampleException [Int])
426426 it "Compose nil, throwM" $
427− (try $ tl (A.nil <> throwM (ExampleException "E")))
427+ (try $ tl (S.nil <> throwM (ExampleException "E")))
428428 `shouldReturn` (Left (ExampleException "E") :: Either ExampleException [Int])
429429 oneLevelNestedSum "serially" serially
430430 oneLevelNestedSum "wSerially" wSerially
@@ -438,12 +438,12 @@ composeWithMonadThrow t = do
438438 oneLevelNestedProduct "wAsyncly" wAsyncly
439439
440440 where
441− tl = A.toList . t
441+ tl = S.toList . t
442442 oneLevelNestedSum desc t1 =
443443 it ("One level nested sum " ++ desc) $ do
444− let nested = (A.fromFoldable [1..10] <> throwM (ExampleException "E")
445− <> A.fromFoldable [1..10])
446− (try $ tl (A.nil <> t1 nested <> A.fromFoldable [1..10]))
444+ let nested = (S.fromFoldable [1..10] <> throwM (ExampleException "E")
445+ <> S.fromFoldable [1..10])
446+ (try $ tl (S.nil <> t1 nested <> S.fromFoldable [1..10]))
447447 `shouldReturn` (Left (ExampleException "E") :: Either ExampleException [Int])
448448
449449 oneLevelNestedProduct desc t1 =
@@ -466,11 +466,11 @@ _composeWithMonadError
466466 )
467467 => (t (ExceptT String IO) Int -> SerialT (ExceptT String IO) Int) -> Spec
468468_composeWithMonadError t = do
469− let tl = A.toList . t
469+ let tl = S.toList . t
470470 it "Compose throwError, nil" $
471− (runExceptT $ tl (throwError "E" <> A.nil)) `shouldReturn` Left "E"
471+ (runExceptT $ tl (throwError "E" <> S.nil)) `shouldReturn` Left "E"
472472 it "Compose nil, error" $
473− (runExceptT $ tl (A.nil <> throwError "E")) `shouldReturn` Left "E"
473+ (runExceptT $ tl (S.nil <> throwError "E")) `shouldReturn` Left "E"
474474
475475nestTwoSerial :: Expectation
476476nestTwoSerial =
@@ -486,7 +486,7 @@ nestTwoAhead :: Expectation
486486nestTwoAhead =
487487 let s1 = foldMapWith (<>) return [1..4]
488488 s2 = foldMapWith (<>) return [5..8]
489− in (A.toList . aheadly) (do
489+ in (S.toList . aheadly) (do
490490 x <- s1
491491 y <- s2
492492 return (x + y)
@@ -503,7 +503,7 @@ nestTwoAheadApp :: Expectation
503503nestTwoAheadApp =
504504 let s1 = foldMapWith (<>) return [1..4]
505505 s2 = foldMapWith (<>) return [5..8]
506− in (A.toList . aheadly) ((+) <$> s1 <*> s2)
506+ in (S.toList . aheadly) ((+) <$> s1 <*> s2)
507507 `shouldReturn` ([6,7,8,9,7,8,9,10,8,9,10,11,9,10,11,12] :: [Int])
508508
509509nestTwoInterleaved :: Expectation
@@ -545,7 +545,7 @@ nestTwoWAsync :: Expectation
545545nestTwoWAsync =
546546 let s1 = foldMapWith (<>) return [1..4]
547547 s2 = foldMapWith (<>) return [5..8]
548− in ((A.toList . wAsyncly) (do
548+ in ((S.toList . wAsyncly) (do
549549 x <- s1
550550 y <- s2
551551 return (x + y)
@@ -556,7 +556,7 @@ nestTwoParallel :: Expectation
556556nestTwoParallel =
557557 let s1 = foldMapWith (<>) return [1..4]
558558 s2 = foldMapWith (<>) return [5..8]
559− in ((A.toList . parallely) (do
559+ in ((S.toList . parallely) (do
560560 x <- s1
561561 y <- s2
562562 return (x + y)
@@ -567,18 +567,18 @@ nestTwoWAsyncApp :: Expectation
567567nestTwoWAsyncApp =
568568 let s1 = foldMapWith (<>) return [1..4]
569569 s2 = foldMapWith (<>) return [5..8]
570− in ((A.toList . wAsyncly) ((+) <$> s1 <*> s2) >>= return . sort)
570+ in ((S.toList . wAsyncly) ((+) <$> s1 <*> s2) >>= return . sort)
571571 `shouldReturn` sort ([6,7,7,8,8,8,9,9,9,9,10,10,10,11,11,12] :: [Int])
572572
573573nestTwoParallelApp :: Expectation
574574nestTwoParallelApp =
575575 let s1 = foldMapWith (<>) return [1..4]
576576 s2 = foldMapWith (<>) return [5..8]
577− in ((A.toList . parallely) ((+) <$> s1 <*> s2) >>= return . sort)
577+ in ((S.toList . parallely) ((+) <$> s1 <*> s2) >>= return . sort)
578578 `shouldReturn` sort ([6,7,7,8,8,8,9,9,9,9,10,10,10,11,11,12] :: [Int])
579579
580580timed :: (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
582582
583583interleaveCheck :: IsStream t
584584 => (t IO Int -> SerialT IO Int)
@@ -586,7 +586,7 @@ interleaveCheck :: IsStream t
586586 -> Spec
587587interleaveCheck t f =
588588 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))
590590 `shouldReturn` ([0, 100, 1, 101])
591591
592592parallelCheck :: (IsStream t, Monad (t IO))
@@ -595,14 +595,14 @@ parallelCheck :: (IsStream t, Monad (t IO))
595595 -> Spec
596596parallelCheck t f = do
597597 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)
599599 `shouldReturn` ([1..4])
600600
601601 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)))
603603 `shouldReturn` ([1..4])
604604
605− where event n = (A.yieldM $ threadDelay (n * 100000)) >> (return n)
605+ where event n = (S.yieldM $ threadDelay (n * 100000)) >> (return n)
606606
607607compose :: (IsStream t, Semigroup (t IO Int))
608608 => (t IO Int -> SerialT IO Int) -> t IO Int -> ([Int] -> [Int]) -> Spec
@@ -635,7 +635,7 @@ compose t z srt = do
635635 ((tl $ (((singleton 0 <> singleton 1) <> (singleton 2 <> singleton 3))
636636 <> ((singleton 4 <> singleton 5) <> (singleton 6 <> singleton 7)))
637637 ) >>= return . srt) `shouldReturn` [0..7]
638− where tl = A.toList . t
638+ where tl = S.toList . t
639639
640640composeAndComposeSimple
641641 :: ( IsStream t1, Semigroup (t1 IO Int)
@@ -650,20 +650,20 @@ composeAndComposeSimple
650650composeAndComposeSimple t1 t2 answer = do
651651 let rfold = adapt . t2 . foldMapWith (<>) return
652652 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])))
654654 `shouldReturn` (answer !! 0)
655655
656656 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]))
658658 `shouldReturn` (answer !! 1)
659659
660660 let lfold xs = adapt $ t2 $ foldl (<>) mempty $ map return xs
661661 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])))
663663 `shouldReturn` (answer !! 2)
664664
665665 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]))
667667 `shouldReturn` (answer !! 3)
668668
669669loops
@@ -673,21 +673,21 @@ loops
673673 -> ([Int] -> [Int])
674674 -> Spec
675675loops 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)
677677 `shouldReturn` [0..3]
678678
679− it "Head recursive loop" $ ((A.toList . adapt) (loopHead 0) >>= return . hsrt)
679+ it "Head recursive loop" $ ((S.toList . adapt) (loopHead 0) >>= return . hsrt)
680680 `shouldReturn` [0..3]
681681
682682 where
683683 loopHead x = do
684684 -- this print line is important for the test (causes a bind)
685− A.yieldM $ putStrLn "LoopHead..."
685+ S.yieldM $ putStrLn "LoopHead..."
686686 t $ (if x < 3 then loopHead (x + 1) else nil) <> return x
687687
688688 loopTail x = do
689689 -- this print line is important for the test (causes a bind)
690− A.yieldM $ putStrLn "LoopTail..."
690+ S.yieldM $ putStrLn "LoopTail..."
691691 t $ return x <> (if x < 3 then loopTail (x + 1) else nil)
692692
693693bindAndComposeSimple
@@ -698,12 +698,12 @@ bindAndComposeSimple
698698bindAndComposeSimple t1 t2 = do
699699 -- XXX need a bind in the body of forEachWith instead of a simple return
700700 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)
702702 >>= return . sort) `shouldReturn` [1..10]
703703
704704 it "Compose many (left fold) with bind" $
705705 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)
707707 >>= return . sort) `shouldReturn` [1..10]
708708
709709bindAndComposeHierarchy
@@ -715,7 +715,7 @@ bindAndComposeHierarchy
715715 -> Spec
716716bindAndComposeHierarchy t1 t2 g = do
717717 it "Bind and compose nested" $
718− ((A.toList . t1) bindComposeNested >>= return . sort)
718+ ((S.toList . t1) bindComposeNested >>= return . sort)
719719 `shouldReturn` (sort (
720720 [12, 18]
721721 ++ replicate 3 13
@@ -755,21 +755,21 @@ mixedOps = do
755755
756756 composeMixed :: SerialT IO Int
757757 composeMixed = do
758− A.yieldM $ return ()
759− A.yieldM $ putStr ""
758+ S.yieldM $ return ()
759+ S.yieldM $ putStr ""
760760 x <- return 1
761761 y <- return 2
762762 z <- do
763763 x1 <- wAsyncly $ return 1 <> return 2
764− A.yieldM $ return ()
765− A.yieldM $ putStr ""
764+ S.yieldM $ return ()
765+ S.yieldM $ putStr ""
766766 y1 <- asyncly $ return 1 <> return 2
767767 z1 <- do
768768 x11 <- return 1 <> return 2
769769 y11 <- asyncly $ return 1 <> return 2
770770 z11 <- wSerially $ return 1 <> return 2
771− A.yieldM $ return ()
772− A.yieldM $ putStr ""
771+ S.yieldM $ return ()
772+ S.yieldM $ putStr ""
773773 return (x11 + y11 + z11)
774774 return (x1 + y1 + z1)
775775 return (x + y + z)
@@ -785,21 +785,21 @@ mixedOpsAheadly = do
785785
786786 composeMixed :: SerialT IO Int
787787 composeMixed = do
788− A.yieldM $ return ()
789− A.yieldM $ putStr ""
788+ S.yieldM $ return ()
789+ S.yieldM $ putStr ""
790790 x <- return 1
791791 y <- return 2
792792 z <- do
793793 x1 <- wAsyncly $ return 1 <> return 2
794− A.yieldM $ return ()
795− A.yieldM $ putStr ""
794+ S.yieldM $ return ()
795+ S.yieldM $ putStr ""
796796 y1 <- aheadly $ return 1 <> return 2
797797 z1 <- do
798798 x11 <- return 1 <> return 2
799799 y11 <- aheadly $ return 1 <> return 2
800800 z11 <- parallely $ return 1 <> return 2
801− A.yieldM $ return ()
802− A.yieldM $ putStr ""
801+ S.yieldM $ return ()
802+ S.yieldM $ putStr ""
803803 return (x11 + y11 + z11)
804804 return (x1 + y1 + z1)
805805 return (x + y + z)
test/Prop.hs+161−161
@@ -21,7 +21,7 @@ import Test.Hspec
2121
2222import Streamly
2323import Streamly.Prelude ((.:), nil)
24−import qualified Streamly.Prelude as A
24+import qualified Streamly.Prelude as S
2525
2626maxTestCount :: Int
2727#ifdef DEVBUILD
@@ -54,7 +54,7 @@ constructWithReplicateM
5454constructWithReplicateM op len =
5555 monadicIO $ do
5656 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)
5858 list <- run $ replicateM (fromIntegral len) x
5959 equals (==) stream list
6060
@@ -67,7 +67,7 @@ transformFromList
6767 -> Property
6868transformFromList constr eq listOp op a =
6969 monadicIO $ do
70− stream <- run ((A.toList . op) (constr a))
70+ stream <- run ((S.toList . op) (constr a))
7171 let list = listOp a
7272 equals eq stream list
7373
@@ -105,7 +105,7 @@ concurrentMapM constr eq op n =
105105 let list = [0..n]
106106 stream <- run $ do
107107 mv <- newEmptyMVar :: IO (MVar ())
108− (A.toList . (op n mv)) (constr list)
108+ (S.toList . (op n mv)) (constr list)
109109 equals eq stream list
110110
111111concurrentFromFoldable
@@ -119,11 +119,11 @@ concurrentFromFoldable eq op n =
119119 let list = [0..n]
120120 stream <- run $ do
121121 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))
123123 equals eq stream list
124124
125125sourceUnfoldrM :: IsStream t => MVar () -> Word8 -> t IO Word8
126−sourceUnfoldrM mv n = A.unfoldrM step 0
126+sourceUnfoldrM mv n = S.unfoldrM step 0
127127 where
128128 -- argument must be integer to avoid overflow of word8 at 255
129129 step :: Int -> IO (Maybe (Word8, Int))
@@ -154,15 +154,15 @@ concurrentUnfoldrM eq op n =
154154 -- since unfoldr happens in parallel with the stream processing we
155155 -- can do two takeMVar in one iteration. If it is not parallel then
156156 -- this will not work and the test will fail.
157− A.toList $ do
157+ S.toList $ do
158158 x <- op (sourceUnfoldrM mv n)
159159 -- results may not be yielded in order, in case of
160160 -- Async/WAsync/Parallel. So we use an increasing count
161161 -- instead.
162− i <- A.yieldM $ readIORef cnt
163− A.yieldM $ modifyIORef cnt (+1)
162+ i <- S.yieldM $ readIORef cnt
163+ S.yieldM $ modifyIORef cnt (+1)
164164 let msg = show i ++ "/" ++ show n
165− A.yieldM $ do
165+ S.yieldM $ do
166166 if even i
167167 then do
168168 dbgMVar ("first take concurrentUnfoldrM " ++ msg)
@@ -187,9 +187,9 @@ concurrentApplication n =
187187 -- since unfoldr happens in parallel with the stream processing we
188188 -- can do two takeMVar in one iteration. If it is not parallel then
189189 -- this will not work and the test will fail.
190− A.toList $ do
190+ S.toList $ do
191191 sourceUnfoldrM mv n |&
192− (A.mapM $ \x -> do
192+ (S.mapM $ \x -> do
193193 let msg = show x ++ "/" ++ show n
194194 if even x
195195 then do
@@ -204,7 +204,7 @@ concurrentApplication n =
204204 equals (==) stream list
205205
206206sourceUnfoldrM1 :: IsStream t => Word8 -> t IO Word8
207−sourceUnfoldrM1 n = A.unfoldrM step 0
207+sourceUnfoldrM1 n = S.unfoldrM step 0
208208 where
209209 -- argument must be integer to avoid overflow of word8 at 255
210210 step :: Int -> IO (Maybe (Word8, Int))
@@ -219,7 +219,7 @@ concurrentFoldlApplication n =
219219 -- XXX we should test empty list case as well
220220 let list = [0..n]
221221 stream <- run $ do
222− sourceUnfoldrM1 n |&. A.foldlM' (\xs x -> return (x : xs)) []
222+ sourceUnfoldrM1 n |&. S.foldlM' (\xs x -> return (x : xs)) []
223223 equals (==) (reverse stream) list
224224
225225concurrentFoldrApplication :: Word8 -> Property
@@ -228,7 +228,7 @@ concurrentFoldrApplication n =
228228 -- XXX we should test empty list case as well
229229 let list = [0..n]
230230 stream <- run $ do
231− sourceUnfoldrM1 n |&. A.foldrM (\x xs -> return (x : xs)) []
231+ sourceUnfoldrM1 n |&. S.foldrM (\x xs -> return (x : xs)) []
232232 equals (==) stream list
233233
234234transformCombineFromList
@@ -244,7 +244,7 @@ transformCombineFromList
244244 -> Property
245245transformCombineFromList constr eq listOp t op a b c =
246246 monadicIO $ do
247− stream <- run ((A.toList . t) $
247+ stream <- run ((S.toList . t) $
248248 constr a <> op (constr b <> constr c))
249249 let list = a <> listOp (b <> c)
250250 equals eq stream list
@@ -305,42 +305,42 @@ transformOps constr desc t eq = do
305305 let transform = transformFromList constr eq
306306 -- Filtering
307307 prop (desc ++ " filter False") $
308− transform (filter (const False)) $ t . (A.filter (const False))
308+ transform (filter (const False)) $ t . (S.filter (const False))
309309 prop (desc ++ " filter True") $
310− transform (filter (const True)) $ t . (A.filter (const True))
310+ transform (filter (const True)) $ t . (S.filter (const True))
311311 prop (desc ++ " filter even") $
312− transform (filter even) $ t . (A.filter even)
312+ transform (filter even) $ t . (S.filter even)
313313
314314 prop (desc ++ " take maxBound") $
315− transform (take maxBound) $ t . (A.take maxBound)
316− prop (desc ++ " take 0") $ transform (take 0) $ t . (A.take 0)
317− prop (desc ++ " take 1") $ transform (take 1) $ t . (A.take 1)
318− prop (desc ++ " take 10") $ transform (take 10) $ t . (A.take 10)
315+ transform (take maxBound) $ t . (S.take maxBound)
316+ prop (desc ++ " take 0") $ transform (take 0) $ t . (S.take 0)
317+ prop (desc ++ " take 1") $ transform (take 1) $ t . (S.take 1)
318+ prop (desc ++ " take 10") $ transform (take 10) $ t . (S.take 10)
319319
320320 prop (desc ++ " takeWhile True") $
321− transform (takeWhile (const True)) $ t . (A.takeWhile (const True))
321+ transform (takeWhile (const True)) $ t . (S.takeWhile (const True))
322322 prop (desc ++ " takeWhile False") $
323− transform (takeWhile (const False)) $ t . (A.takeWhile (const False))
323+ transform (takeWhile (const False)) $ t . (S.takeWhile (const False))
324324 prop (desc ++ " takeWhile > 0") $
325− transform (takeWhile (> 0)) $ t . (A.takeWhile (> 0))
325+ transform (takeWhile (> 0)) $ t . (S.takeWhile (> 0))
326326
327327 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)
329329
330330 prop (desc ++ " drop maxBound") $
331− transform (drop maxBound) $ t . (A.drop maxBound)
332− prop (desc ++ " drop 0") $ transform (drop 0) $ t . (A.drop 0)
333− prop (desc ++ " drop 1") $ transform (drop 1) $ t . (A.drop 1)
334− prop (desc ++ " drop 10") $ transform (drop 10) $ t . (A.drop 10)
331+ transform (drop maxBound) $ t . (S.drop maxBound)
332+ prop (desc ++ " drop 0") $ transform (drop 0) $ t . (S.drop 0)
333+ prop (desc ++ " drop 1") $ transform (drop 1) $ t . (S.drop 1)
334+ prop (desc ++ " drop 10") $ transform (drop 10) $ t . (S.drop 10)
335335
336336 prop (desc ++ " dropWhile True") $
337− transform (dropWhile (const True)) $ t . (A.dropWhile (const True))
337+ transform (dropWhile (const True)) $ t . (S.dropWhile (const True))
338338 prop (desc ++ " dropWhile False") $
339− transform (dropWhile (const False)) $ t . (A.dropWhile (const False))
339+ transform (dropWhile (const False)) $ t . (S.dropWhile (const False))
340340 prop (desc ++ " dropWhile > 0") $
341− transform (dropWhile (> 0)) $ t . (A.dropWhile (> 0))
342− prop (desc ++ " scan") $ transform (scanl' (+) 0) $ t . (A.scanl' (+) 0)
343− prop (desc ++ " reverse") $ transform reverse $ t . A.reverse
341+ transform (dropWhile (> 0)) $ t . (S.dropWhile (> 0))
342+ prop (desc ++ " scan") $ transform (scanl' (+) 0) $ t . (S.scanl' (+) 0)
343+ prop (desc ++ " reverse") $ transform reverse $ t . S.reverse
344344
345345concurrentOps
346346 :: IsStream t
@@ -362,7 +362,7 @@ concurrentOps constr desc t eq = do
362362 -- then it will block even if it is concurrent.
363363 prop (desc ++ " mapM") $ withMaxSuccess maxTestCount $
364364 concurrentMapM constr eq $ \n mv stream ->
365− t $ A.mapM (mvarSequenceOp mv n) stream
365+ t $ S.mapM (mvarSequenceOp mv n) stream
366366
367367-- XXX add tests for MonadReader and MonadError etc. In case an SVar is
368368-- accidentally passed through them.
@@ -377,32 +377,32 @@ transformCombineOpsCommon constr desc t eq = do
377377 let transform = transformCombineFromList constr eq
378378 -- Filtering
379379 prop (desc ++ " filter False") $
380− transform (filter (const False)) t (A.filter (const False))
380+ transform (filter (const False)) t (S.filter (const False))
381381 prop (desc ++ " filter True") $
382− transform (filter (const True)) t (A.filter (const True))
382+ transform (filter (const True)) t (S.filter (const True))
383383 prop (desc ++ " filter even") $
384− transform (filter even) t (A.filter even)
384+ transform (filter even) t (S.filter even)
385385
386386 prop (desc ++ " take maxBound") $
387− transform (take maxBound) t (A.take maxBound)
388− prop (desc ++ " take 0") $ transform (take 0) t (A.take 0)
387+ transform (take maxBound) t (S.take maxBound)
388+ prop (desc ++ " take 0") $ transform (take 0) t (S.take 0)
389389
390390 prop (desc ++ " takeWhile True") $
391− transform (takeWhile (const True)) t (A.takeWhile (const True))
391+ transform (takeWhile (const True)) t (S.takeWhile (const True))
392392 prop (desc ++ " takeWhile False") $
393− transform (takeWhile (const False)) t (A.takeWhile (const False))
393+ transform (takeWhile (const False)) t (S.takeWhile (const False))
394394
395395 prop (desc ++ " drop maxBound") $
396− transform (drop maxBound) t (A.drop maxBound)
397− prop (desc ++ " drop 0") $ transform (drop 0) t (A.drop 0)
396+ transform (drop maxBound) t (S.drop maxBound)
397+ prop (desc ++ " drop 0") $ transform (drop 0) t (S.drop 0)
398398
399399 prop (desc ++ " dropWhile True") $
400− transform (dropWhile (const True)) t (A.dropWhile (const True))
400+ transform (dropWhile (const True)) t (S.dropWhile (const True))
401401 prop (desc ++ " dropWhile False") $
402− transform (dropWhile (const False)) t (A.dropWhile (const False))
402+ transform (dropWhile (const False)) t (S.dropWhile (const False))
403403 prop (desc ++ " scan") $ transform (scanl' (flip const) 0) t
404− (A.scanl' (flip const) 0)
405− prop (desc ++ " reverse") $ transform reverse t A.reverse
404+ (S.scanl' (flip const) 0)
405+ prop (desc ++ " reverse") $ transform reverse t S.reverse
406406
407407transformCombineOpsOrdered
408408 :: (IsStream t, Semigroup (t IO Int))
@@ -414,18 +414,18 @@ transformCombineOpsOrdered
414414transformCombineOpsOrdered constr desc t eq = do
415415 let transform = transformCombineFromList constr eq
416416 -- Filtering
417− prop (desc ++ " take 1") $ transform (take 1) t (A.take 1)
418− prop (desc ++ " take 10") $ transform (take 10) t (A.take 10)
417+ prop (desc ++ " take 1") $ transform (take 1) t (S.take 1)
418+ prop (desc ++ " take 10") $ transform (take 10) t (S.take 10)
419419
420420 prop (desc ++ " takeWhile > 0") $
421− transform (takeWhile (> 0)) t (A.takeWhile (> 0))
421+ transform (takeWhile (> 0)) t (S.takeWhile (> 0))
422422
423− prop (desc ++ " drop 1") $ transform (drop 1) t (A.drop 1)
424− prop (desc ++ " drop 10") $ transform (drop 10) t (A.drop 10)
423+ prop (desc ++ " drop 1") $ transform (drop 1) t (S.drop 1)
424+ prop (desc ++ " drop 10") $ transform (drop 10) t (S.drop 10)
425425
426426 prop (desc ++ " dropWhile > 0") $
427− transform (dropWhile (> 0)) t (A.dropWhile (> 0))
428− prop (desc ++ " scan") $ transform (scanl' (+) 0) t (A.scanl' (+) 0)
427+ transform (dropWhile (> 0)) t (S.dropWhile (> 0))
428+ prop (desc ++ " scan") $ transform (scanl' (+) 0) t (S.scanl' (+) 0)
429429
430430wrapMaybe :: Eq a1 => ([a1] -> a2) -> [a1] -> Maybe a2
431431wrapMaybe f =
@@ -441,17 +441,17 @@ eliminationOps
441441 -> Spec
442442eliminationOps constr desc t = do
443443 -- Elimination
444− prop (desc ++ " null") $ eliminateOp constr null $ A.null . t
444+ prop (desc ++ " null") $ eliminateOp constr null $ S.null . t
445445 prop (desc ++ " foldl") $
446− eliminateOp constr (foldl' (+) 0) $ (A.foldl' (+) 0) . t
447− prop (desc ++ " all") $ eliminateOp constr (all even) $ (A.all even) . t
448− prop (desc ++ " any") $ eliminateOp constr (any even) $ (A.any even) . t
449− prop (desc ++ " length") $ eliminateOp constr length $ A.length . t
450− prop (desc ++ " sum") $ eliminateOp constr sum $ A.sum . t
451− prop (desc ++ " product") $ eliminateOp constr product $ A.product . t
446+ eliminateOp constr (foldl' (+) 0) $ (S.foldl' (+) 0) . t
447+ prop (desc ++ " all") $ eliminateOp constr (all even) $ (S.all even) . t
448+ prop (desc ++ " any") $ eliminateOp constr (any even) $ (S.any even) . t
449+ prop (desc ++ " length") $ eliminateOp constr length $ S.length . t
450+ prop (desc ++ " sum") $ eliminateOp constr sum $ S.sum . t
451+ prop (desc ++ " product") $ eliminateOp constr product $ S.product . t
452452
453− prop (desc ++ " maximum") $ eliminateOp constr (wrapMaybe maximum) $ A.maximum . t
454− prop (desc ++ " minimum") $ eliminateOp constr (wrapMaybe minimum) $ A.minimum . t
453+ prop (desc ++ " maximum") $ eliminateOp constr (wrapMaybe maximum) $ S.maximum . t
454+ prop (desc ++ " minimum") $ eliminateOp constr (wrapMaybe minimum) $ S.minimum . t
455455
456456-- head/tail/last may depend on the order in case of parallel streams
457457-- so we test these only for serial streams.
@@ -461,13 +461,13 @@ serialEliminationOps
461461 -> (t IO Int -> SerialT IO Int)
462462 -> Spec
463463serialEliminationOps 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
465465 prop (desc ++ " tail") $ eliminateOp constr (wrapMaybe tail) $ \x -> do
466− r <- A.tail (t x)
466+ r <- S.tail (t x)
467467 case r of
468468 Nothing -> return Nothing
469− Just s -> A.toList s >>= return . Just
470− prop (desc ++ " last") $ eliminateOp constr (wrapMaybe last) $ A.last . t
469+ Just s -> S.toList s >>= return . Just
470+ prop (desc ++ " last") $ eliminateOp constr (wrapMaybe last) $ S.last . t
471471
472472transformOpsWord8
473473 :: ([Word8] -> t IO Word8)
@@ -475,8 +475,8 @@ transformOpsWord8
475475 -> (t IO Word8 -> SerialT IO Word8)
476476 -> Spec
477477transformOpsWord8 constr desc t = do
478− prop (desc ++ " elem") $ elemOp constr t A.elem elem
479− prop (desc ++ " elem") $ elemOp constr t A.notElem notElem
478+ prop (desc ++ " elem") $ elemOp constr t S.elem elem
479+ prop (desc ++ " elem") $ elemOp constr t S.notElem notElem
480480
481481-- XXX concatenate streams of multiple elements rather than single elements
482482semigroupOps
@@ -503,7 +503,7 @@ applicativeOps
503503 -> Property
504504applicativeOps constr t eq (a, b) = withMaxSuccess maxTestCount $
505505 monadicIO $ do
506− stream <- run ((A.toList . t) ((,) <$> (constr a) <*> (constr b)))
506+ stream <- run ((S.toList . t) ((,) <$> (constr a) <*> (constr b)))
507507 let list = (,) <$> a <*> b
508508 equals eq stream list
509509
@@ -516,9 +516,9 @@ zipApplicative
516516 -> Property
517517zipApplicative constr t eq (a, b) = withMaxSuccess maxTestCount $
518518 monadicIO $ do
519− stream1 <- run ((A.toList . t) ((,) <$> (constr a) <*> (constr b)))
520− stream2 <- run ((A.toList . t) (pure (,) <*> (constr a) <*> (constr b)))
521− stream3 <- run ((A.toList . t) (A.zipWith (,) (constr a) (constr b)))
519+ stream1 <- run ((S.toList . t) ((,) <$> (constr a) <*> (constr b)))
520+ stream2 <- run ((S.toList . t) (pure (,) <*> (constr a) <*> (constr b)))
521+ stream3 <- run ((S.toList . t) (S.zipWith (,) (constr a) (constr b)))
522522 let list = getZipList $ (,) <$> ZipList a <*> ZipList b
523523 equals eq stream1 list
524524 equals eq stream2 list
@@ -535,12 +535,12 @@ zipMonadic constr t eq (a, b) = withMaxSuccess maxTestCount $
535535 monadicIO $ do
536536 stream1 <-
537537 run
538− ((A.toList . t)
539− (A.zipWithM (\x y -> return (x, y)) (constr a) (constr b)))
538+ ((S.toList . t)
539+ (S.zipWithM (\x y -> return (x, y)) (constr a) (constr b)))
540540 stream2 <-
541541 run
542− ((A.toList . t)
543− (A.zipAsyncWithM (\x y -> return (x, y)) (constr a) (constr b)))
542+ ((S.toList . t)
543+ (S.zipAsyncWithM (\x y -> return (x, y)) (constr a) (constr b)))
544544 let list = getZipList $ (,) <$> ZipList a <*> ZipList b
545545 equals eq stream1 list
546546 equals eq stream2 list
@@ -553,7 +553,7 @@ monadThen
553553 -> ([Int], [Int])
554554 -> Property
555555monadThen 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)))
557557 let list = a >> b
558558 equals eq stream list
559559
@@ -568,7 +568,7 @@ monadBind constr t eq (a, b) = withMaxSuccess maxTestCount $
568568 monadicIO $ do
569569 stream <-
570570 run
571− ((A.toList . t)
571+ ((S.toList . t)
572572 ((constr a) >>= \x -> (constr b) >>= return . (+ x)))
573573 let list = a >>= \x -> b >>= return . (+ x)
574574 equals eq stream list
@@ -585,30 +585,30 @@ main = hspec $ do
585585 -- XXX test for all types of streams
586586 prop "serially replicateM" $ constructWithReplicateM serially
587587 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)))
589589 `shouldReturn` (take 100 $ iterate (+ 1) 0)
590590
591591 it "iterateM" $ do
592592 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)
594594 `shouldReturn` (take 100 $ iterate (+ 1) 0)
595595
596596 describe "Functor operations" $ do
597− functorOps A.fromFoldable "serially" serially (==)
597+ functorOps S.fromFoldable "serially" serially (==)
598598 functorOps folded "serially folded" serially (==)
599− functorOps A.fromFoldable "wSerially" wSerially (==)
599+ functorOps S.fromFoldable "wSerially" wSerially (==)
600600 functorOps folded "wSerially folded" wSerially (==)
601− functorOps A.fromFoldable "aheadly" aheadly (==)
601+ functorOps S.fromFoldable "aheadly" aheadly (==)
602602 functorOps folded "aheadly folded" aheadly (==)
603− functorOps A.fromFoldable "asyncly" asyncly sortEq
603+ functorOps S.fromFoldable "asyncly" asyncly sortEq
604604 functorOps folded "asyncly folded" asyncly sortEq
605− functorOps A.fromFoldable "wAsyncly" wAsyncly sortEq
605+ functorOps S.fromFoldable "wAsyncly" wAsyncly sortEq
606606 functorOps folded "wAsyncly folded" wAsyncly sortEq
607− functorOps A.fromFoldable "parallely" parallely sortEq
607+ functorOps S.fromFoldable "parallely" parallely sortEq
608608 functorOps folded "parallely folded" parallely sortEq
609− functorOps A.fromFoldable "zipSerially" zipSerially (==)
609+ functorOps S.fromFoldable "zipSerially" zipSerially (==)
610610 functorOps folded "zipSerially folded" zipSerially (==)
611− functorOps A.fromFoldable "zipAsyncly" zipAsyncly (==)
611+ functorOps S.fromFoldable "zipAsyncly" zipAsyncly (==)
612612 functorOps folded "zipAsyncly folded" zipAsyncly (==)
613613
614614 describe "Semigroup operations" $ do
@@ -625,43 +625,43 @@ main = hspec $ do
625625 -- The tests using sorted equality are weaker tests
626626 -- We need to have stronger unit tests for all those
627627 -- XXX applicative with three arguments
628− prop "serially applicative" $ applicativeOps A.fromFoldable serially (==)
628+ prop "serially applicative" $ applicativeOps S.fromFoldable serially (==)
629629 prop "serially applicative folded" $ applicativeOps folded serially (==)
630− prop "aheadly applicative" $ applicativeOps A.fromFoldable aheadly (==)
630+ prop "aheadly applicative" $ applicativeOps S.fromFoldable aheadly (==)
631631 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
633633 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
635635 prop "asyncly applicative folded" $ applicativeOps folded asyncly sortEq
636636 prop "wAsyncly applicative folded" $ applicativeOps folded wAsyncly sortEq
637637 prop "parallely applicative folded" $ applicativeOps folded parallely sortEq
638638
639639 describe "Zip operations" $ do
640− prop "zipSerially applicative" $ zipApplicative A.fromFoldable zipSerially (==)
640+ prop "zipSerially applicative" $ zipApplicative S.fromFoldable zipSerially (==)
641641 prop "zipSerially applicative folded" $ zipApplicative folded zipSerially (==)
642− prop "zipAsyncly applicative" $ zipApplicative A.fromFoldable zipAsyncly (==)
642+ prop "zipAsyncly applicative" $ zipApplicative S.fromFoldable zipAsyncly (==)
643643 prop "zipAsyncly applicative folded" $ zipApplicative folded zipAsyncly (==)
644644
645− prop "zip monadic serially" $ zipMonadic A.fromFoldable serially (==)
645+ prop "zip monadic serially" $ zipMonadic S.fromFoldable serially (==)
646646 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 (==)
648648 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 (==)
650650 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 (==)
652652 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 (==)
654654 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 (==)
656656 prop "zip monadic parallely folded" $ zipMonadic folded parallely (==)
657657
658658 describe "Monad operations" $ do
659− prop "serially monad then" $ monadThen A.fromFoldable serially (==)
660− prop "aheadly monad then" $ monadThen A.fromFoldable aheadly (==)
661− prop "wSerially monad then" $ monadThen A.fromFoldable wSerially sortEq
662− prop "asyncly monad then" $ monadThen A.fromFoldable asyncly sortEq
663− prop "wAsyncly monad then" $ monadThen A.fromFoldable wAsyncly sortEq
664− prop "parallely monad then" $ monadThen A.fromFoldable parallely sortEq
659+ prop "serially monad then" $ monadThen S.fromFoldable serially (==)
660+ prop "aheadly monad then" $ monadThen S.fromFoldable aheadly (==)
661+ prop "wSerially monad then" $ monadThen S.fromFoldable wSerially sortEq
662+ prop "asyncly monad then" $ monadThen S.fromFoldable asyncly sortEq
663+ prop "wAsyncly monad then" $ monadThen S.fromFoldable wAsyncly sortEq
664+ prop "parallely monad then" $ monadThen S.fromFoldable parallely sortEq
665665
666666 prop "serially monad then folded" $ monadThen folded serially (==)
667667 prop "aheadly monad then folded" $ monadThen folded aheadly (==)
@@ -670,22 +670,22 @@ main = hspec $ do
670670 prop "wAsyncly monad then folded" $ monadThen folded wAsyncly sortEq
671671 prop "parallely monad then folded" $ monadThen folded parallely sortEq
672672
673− prop "serially monad bind" $ monadBind A.fromFoldable serially (==)
674− prop "aheadly monad bind" $ monadBind A.fromFoldable aheadly (==)
675− prop "wSerially monad bind" $ monadBind A.fromFoldable wSerially sortEq
676− prop "asyncly monad bind" $ monadBind A.fromFoldable asyncly sortEq
677− prop "wAsyncly monad bind" $ monadBind A.fromFoldable wAsyncly sortEq
678− prop "parallely monad bind" $ monadBind A.fromFoldable parallely sortEq
673+ prop "serially monad bind" $ monadBind S.fromFoldable serially (==)
674+ prop "aheadly monad bind" $ monadBind S.fromFoldable aheadly (==)
675+ prop "wSerially monad bind" $ monadBind S.fromFoldable wSerially sortEq
676+ prop "asyncly monad bind" $ monadBind S.fromFoldable asyncly sortEq
677+ prop "wAsyncly monad bind" $ monadBind S.fromFoldable wAsyncly sortEq
678+ prop "parallely monad bind" $ monadBind S.fromFoldable parallely sortEq
679679
680680 describe "Stream transform operations" $ do
681− transformOps A.fromFoldable "serially" serially (==)
682− transformOps A.fromFoldable "aheadly" aheadly (==)
683− transformOps A.fromFoldable "wSerially" wSerially (==)
684− transformOps A.fromFoldable "zipSerially" zipSerially (==)
685− transformOps A.fromFoldable "zipAsyncly" zipAsyncly (==)
686− transformOps A.fromFoldable "asyncly" asyncly sortEq
687− transformOps A.fromFoldable "wAsyncly" wAsyncly sortEq
688− transformOps A.fromFoldable "parallely" parallely sortEq
681+ transformOps S.fromFoldable "serially" serially (==)
682+ transformOps S.fromFoldable "aheadly" aheadly (==)
683+ transformOps S.fromFoldable "wSerially" wSerially (==)
684+ transformOps S.fromFoldable "zipSerially" zipSerially (==)
685+ transformOps S.fromFoldable "zipAsyncly" zipAsyncly (==)
686+ transformOps S.fromFoldable "asyncly" asyncly sortEq
687+ transformOps S.fromFoldable "wAsyncly" wAsyncly sortEq
688+ transformOps S.fromFoldable "parallely" parallely sortEq
689689
690690 transformOps folded "serially folded" serially (==)
691691 transformOps folded "aheadly folded" aheadly (==)
@@ -696,14 +696,14 @@ main = hspec $ do
696696 transformOps folded "wAsyncly folded" wAsyncly sortEq
697697 transformOps folded "parallely folded" parallely sortEq
698698
699− transformOpsWord8 A.fromFoldable "serially" serially
700− transformOpsWord8 A.fromFoldable "aheadly" aheadly
701− transformOpsWord8 A.fromFoldable "wSerially" wSerially
702− transformOpsWord8 A.fromFoldable "zipSerially" zipSerially
703− transformOpsWord8 A.fromFoldable "zipAsyncly" zipAsyncly
704− transformOpsWord8 A.fromFoldable "asyncly" asyncly
705− transformOpsWord8 A.fromFoldable "wAsyncly" wAsyncly
706− transformOpsWord8 A.fromFoldable "parallely" parallely
699+ transformOpsWord8 S.fromFoldable "serially" serially
700+ transformOpsWord8 S.fromFoldable "aheadly" aheadly
701+ transformOpsWord8 S.fromFoldable "wSerially" wSerially
702+ transformOpsWord8 S.fromFoldable "zipSerially" zipSerially
703+ transformOpsWord8 S.fromFoldable "zipAsyncly" zipAsyncly
704+ transformOpsWord8 S.fromFoldable "asyncly" asyncly
705+ transformOpsWord8 S.fromFoldable "wAsyncly" wAsyncly
706+ transformOpsWord8 S.fromFoldable "parallely" parallely
707707
708708 transformOpsWord8 folded "serially folded" serially
709709 transformOpsWord8 folded "aheadly folded" aheadly
@@ -716,10 +716,10 @@ main = hspec $ do
716716
717717 -- XXX add tests with outputQueue size set to 1
718718 describe "Stream concurrent operations" $ do
719− concurrentOps A.fromFoldable "aheadly" aheadly (==)
720− concurrentOps A.fromFoldable "asyncly" asyncly sortEq
721− concurrentOps A.fromFoldable "wAsyncly" wAsyncly sortEq
722− concurrentOps A.fromFoldable "parallely" parallely sortEq
719+ concurrentOps S.fromFoldable "aheadly" aheadly (==)
720+ concurrentOps S.fromFoldable "asyncly" asyncly sortEq
721+ concurrentOps S.fromFoldable "wAsyncly" wAsyncly sortEq
722+ concurrentOps S.fromFoldable "parallely" parallely sortEq
723723
724724 concurrentOps folded "aheadly folded" aheadly (==)
725725 concurrentOps folded "asyncly folded" asyncly sortEq
@@ -736,14 +736,14 @@ main = hspec $ do
736736 -- These tests are specifically targeted towards detecting illegal sharing
737737 -- of SVar across conurrent streams.
738738 describe "Stream transform and combine operations" $ do
739− transformCombineOpsCommon A.fromFoldable "serially" serially (==)
740− transformCombineOpsCommon A.fromFoldable "aheadly" aheadly (==)
741− transformCombineOpsCommon A.fromFoldable "wSerially" wSerially sortEq
742− transformCombineOpsCommon A.fromFoldable "zipSerially" zipSerially (==)
743− transformCombineOpsCommon A.fromFoldable "zipAsyncly" zipAsyncly (==)
744− transformCombineOpsCommon A.fromFoldable "asyncly" asyncly sortEq
745− transformCombineOpsCommon A.fromFoldable "wAsyncly" wAsyncly sortEq
746− transformCombineOpsCommon A.fromFoldable "parallely" parallely sortEq
739+ transformCombineOpsCommon S.fromFoldable "serially" serially (==)
740+ transformCombineOpsCommon S.fromFoldable "aheadly" aheadly (==)
741+ transformCombineOpsCommon S.fromFoldable "wSerially" wSerially sortEq
742+ transformCombineOpsCommon S.fromFoldable "zipSerially" zipSerially (==)
743+ transformCombineOpsCommon S.fromFoldable "zipAsyncly" zipAsyncly (==)
744+ transformCombineOpsCommon S.fromFoldable "asyncly" asyncly sortEq
745+ transformCombineOpsCommon S.fromFoldable "wAsyncly" wAsyncly sortEq
746+ transformCombineOpsCommon S.fromFoldable "parallely" parallely sortEq
747747
748748 transformCombineOpsCommon folded "serially" serially (==)
749749 transformCombineOpsCommon folded "aheadly" aheadly (==)
@@ -754,20 +754,20 @@ main = hspec $ do
754754 transformCombineOpsCommon folded "wAsyncly" wAsyncly sortEq
755755 transformCombineOpsCommon folded "parallely" parallely sortEq
756756
757− transformCombineOpsOrdered A.fromFoldable "serially" serially (==)
758− transformCombineOpsOrdered A.fromFoldable "serially" aheadly (==)
759− transformCombineOpsOrdered A.fromFoldable "zipSerially" zipSerially (==)
760− transformCombineOpsOrdered A.fromFoldable "zipAsyncly" zipAsyncly (==)
757+ transformCombineOpsOrdered S.fromFoldable "serially" serially (==)
758+ transformCombineOpsOrdered S.fromFoldable "serially" aheadly (==)
759+ transformCombineOpsOrdered S.fromFoldable "zipSerially" zipSerially (==)
760+ transformCombineOpsOrdered S.fromFoldable "zipAsyncly" zipAsyncly (==)
761761
762762 describe "Stream elimination operations" $ do
763− eliminationOps A.fromFoldable "serially" serially
764− eliminationOps A.fromFoldable "aheadly" aheadly
765− eliminationOps A.fromFoldable "wSerially" wSerially
766− eliminationOps A.fromFoldable "zipSerially" zipSerially
767− eliminationOps A.fromFoldable "zipAsyncly" zipAsyncly
768− eliminationOps A.fromFoldable "asyncly" asyncly
769− eliminationOps A.fromFoldable "wAsyncly" wAsyncly
770− eliminationOps A.fromFoldable "parallely" parallely
763+ eliminationOps S.fromFoldable "serially" serially
764+ eliminationOps S.fromFoldable "aheadly" aheadly
765+ eliminationOps S.fromFoldable "wSerially" wSerially
766+ eliminationOps S.fromFoldable "zipSerially" zipSerially
767+ eliminationOps S.fromFoldable "zipAsyncly" zipAsyncly
768+ eliminationOps S.fromFoldable "asyncly" asyncly
769+ eliminationOps S.fromFoldable "wAsyncly" wAsyncly
770+ eliminationOps S.fromFoldable "parallely" parallely
771771
772772 eliminationOps folded "serially folded" serially
773773 eliminationOps folded "aheadly folded" aheadly
@@ -779,11 +779,11 @@ main = hspec $ do
779779 eliminationOps folded "parallely folded" parallely
780780
781781 describe "Stream serial elimination operations" $ do
782− serialEliminationOps A.fromFoldable "serially" serially
783− serialEliminationOps A.fromFoldable "aheadly" aheadly
784− serialEliminationOps A.fromFoldable "wSerially" wSerially
785− serialEliminationOps A.fromFoldable "zipSerially" zipSerially
786− serialEliminationOps A.fromFoldable "zipAsyncly" zipAsyncly
782+ serialEliminationOps S.fromFoldable "serially" serially
783+ serialEliminationOps S.fromFoldable "aheadly" aheadly
784+ serialEliminationOps S.fromFoldable "wSerially" wSerially
785+ serialEliminationOps S.fromFoldable "zipSerially" zipSerially
786+ serialEliminationOps S.fromFoldable "zipAsyncly" zipAsyncly
787787
788788 serialEliminationOps folded "serially folded" serially
789789 serialEliminationOps folded "aheadly folded" aheadly