on master help sign in
rename interleave=>coserial, aparallel=>coparallel
commit3f638d9b6d951f4a0d12a87a4f34f911c8874c65 authorHarendra Kumar <harendra.kumar@gmail.com> dateWed 18 Apr 2018, 16:48 (8 years ago) parent0631b9d
8 files changed+150−150
benchmark/Main.hs+17−17 examples/loops.hs+4−4 src/Streamly.hs+6−6 src/Streamly/Core.hs+12−12 src/Streamly/Examples/ListDirRecursive.hs+3−3 src/Streamly/Streams.hs+36−36 test/Main.hs+38−38 test/Prop.hs+34−34
benchmark/Main.hs+17−17
@@ -41,38 +41,38 @@ main = do
4141 [ bench "function style all serial" $ nfIO streamly_function_style
4242
4343 , bgroup "serial bind"
44− [ bench "serial" $ nfIO (as (A.append))
45− , bench "fair serial" $ nfIO (as (A.interleave))
46− , bench "left parallel" $ nfIO (as (A.aparallel))
44+ [ bench "serial" $ nfIO (as (A.serial))
45+ , bench "fair serial" $ nfIO (as (A.coserial))
46+ , bench "left parallel" $ nfIO (as (A.coparallel))
4747 , bench "fair parallel" $ nfIO (as (A.parallel))
4848 ]
4949
5050 , bgroup "interleaved bind"
51− [ bench "serial" $ nfIO (ai (A.append))
52− , bench "fair serial" $ nfIO (ai (A.interleave))
53− , bench "left parallel" $ nfIO (ai (A.aparallel))
51+ [ bench "serial" $ nfIO (ai (A.serial))
52+ , bench "fair serial" $ nfIO (ai (A.coserial))
53+ , bench "left parallel" $ nfIO (ai (A.coparallel))
5454 , bench "fair parallel" $ nfIO (ai (A.parallel))
5555 ]
5656
5757 , bgroup "async bind"
58− [ bench "serial" $ nfIO (aa (A.append))
59− , bench "fair serial" $ nfIO (aa (A.interleave))
60− , bench "left parallel" $ nfIO (aa (A.aparallel))
58+ [ bench "serial" $ nfIO (aa (A.serial))
59+ , bench "fair serial" $ nfIO (aa (A.coserial))
60+ , bench "left parallel" $ nfIO (aa (A.coparallel))
6161 , bench "fair parallel" $ nfIO (aa (A.parallel))
6262 ]
6363
6464 , bgroup "parallel bind"
65− [ bench "serial" $ nfIO (ap (A.append))
66− , bench "fair serial" $ nfIO (ap (A.interleave))
67− , bench "left parallel" $ nfIO (ap (A.aparallel))
65+ [ bench "serial" $ nfIO (ap (A.serial))
66+ , bench "fair serial" $ nfIO (ap (A.coserial))
67+ , bench "left parallel" $ nfIO (ap (A.coparallel))
6868 , bench "fair parallel" $ nfIO (ap (A.parallel))
6969 ]
7070
7171 -- Benchmark smallest possible actions composed together
7272 , bgroup "serial bind nil"
73− [ bench "serial" $ nfIO (streamly_nil (A.append))
74− , bench "fair serial" $ nfIO (streamly_nil (A.interleave))
75− , bench "left parallel" $ nfIO (streamly_nil (A.aparallel))
73+ [ bench "serial" $ nfIO (streamly_nil (A.serial))
74+ , bench "fair serial" $ nfIO (streamly_nil (A.coserial))
75+ , bench "left parallel" $ nfIO (streamly_nil (A.coparallel))
7676 , bench "fair parallel" $ nfIO (streamly_nil (A.parallel))
7777 ]
7878 ]
@@ -143,13 +143,13 @@ streamly_serial = streamly_basic (A.toList . A.serially)
143143streamly_interleaved
144144 :: (A.InterleavedT IO Int -> A.InterleavedT IO Int -> A.InterleavedT IO Int)
145145 -> IO Int
146−streamly_interleaved = streamly_basic (A.toList . A.interleaving)
146+streamly_interleaved = streamly_basic (A.toList . A.coserially)
147147
148148{-# INLINE streamly_async #-}
149149streamly_async
150150 :: (A.AParallelT IO Int -> A.AParallelT IO Int -> A.AParallelT IO Int)
151151 -> IO Int
152−streamly_async = streamly_basic (A.toList . A.aparallely)
152+streamly_async = streamly_basic (A.toList . A.coparallely)
153153
154154{-# INLINE streamly_parallel #-}
155155streamly_parallel
examples/loops.hs+4−4
@@ -24,9 +24,9 @@ main = do
2424 x <- loopHeadA 0
2525 liftIO $ print (x :: Int)
2626
27− putStrLn $ "\ninterleave:\n"
27+ putStrLn $ "\ncoserial:\n"
2828 runStream $ do
29− x <- (return 0 <> return 1) `interleave` (return 100 <> return 101)
29+ x <- (return 0 <> return 1) `coserial` (return 100 <> return 101)
3030 liftIO $ print (x :: Int)
3131
3232 putStrLn $ "\nParallel interleave:\n"
@@ -71,12 +71,12 @@ main = do
7171 loopTailA :: Int -> SerialT IO Int
7272 loopTailA x = do
7373 liftIO $ putStrLn "LoopTailA..."
74− return x `aparallel` (if x < 3 then loopTailA (x + 1) else empty)
74+ return x `coparallel` (if x < 3 then loopTailA (x + 1) else empty)
7575
7676 loopHeadA :: Int -> SerialT IO Int
7777 loopHeadA x = do
7878 liftIO $ putStrLn "LoopHeadA..."
79− (if x < 3 then loopHeadA (x + 1) else empty) `aparallel` return x
79+ (if x < 3 then loopHeadA (x + 1) else empty) `coparallel` return x
8080
8181-------------------------------------------------------------------------------
8282-- Parallel (fairly scheduled, multi-threaded) stream generator loops
src/Streamly.hs+6−6
@@ -32,9 +32,9 @@ module Streamly
3232
3333 -- * Polymorphic Sum Operations
3434 -- $sum
35− , append
36− , interleave
37− , aparallel
35+ , serial
36+ , coserial
37+ , coparallel
3838 , parallel
3939
4040 -- * Transformation
@@ -43,8 +43,8 @@ module Streamly
4343 -- * Stream Type Adapters
4444 -- $adapters
4545 , serially
46− , interleaving
47− , aparallely
46+ , coserially
47+ , coparallely
4848 , parallely
4949 , zipping
5050 , zippingAsync
@@ -193,7 +193,7 @@ import Control.Monad.Trans.Class (MonadTrans (..))
193193-- To adapt from one monomorphic type (e.g. 'ParallelT') to another monomorphic
194194-- type (e.g. 'SerialT') use the 'adapt' combinator. To give a polymorphic code
195195-- a specific interpretation or to adapt a specific type to a polymorphic type
196−-- use the type specific combinators e.g. 'parallely' or 'interleaving'. You
196+-- use the type specific combinators e.g. 'parallely' or 'coserially'. You
197197-- cannot adapt polymorphic code to polymorphic code, as it would not know
198198-- which specific type you are converting from or to. If you see a an
199199-- @ambiguous type variable@ error then most likely you are using 'adapt'
src/Streamly/Core.hs+12−12
@@ -29,9 +29,9 @@ module Streamly.Core
2929 , nil
3030
3131 -- * Semigroup Style Composition
32− , append
33− , interleave
34− , aparallel
32+ , serial
33+ , coserial
34+ , coparallel
3535 , parallel
3636
3737 -- * Alternative
@@ -242,8 +242,8 @@ nil = Stream $ \_ stp _ -> stp
242242
243243-- | Concatenates two streams sequentially i.e. the first stream is
244244-- exhausted completely before yielding any element from the second stream.
245−append :: Stream m a -> Stream m a -> Stream m a
246−append m1 m2 = go m1
245+serial :: Stream m a -> Stream m a -> Stream m a
246+serial m1 m2 = go m1
247247 where
248248 go (Stream m) = Stream $ \_ stp yld ->
249249 let stop = (runStream m2) Nothing stp yld
@@ -252,7 +252,7 @@ append m1 m2 = go m1
252252 in m Nothing stop yield
253253
254254instance Semigroup (Stream m a) where
255− (<>) = append
255+ (<>) = serial
256256
257257------------------------------------------------------------------------------
258258-- Monoid
@@ -266,11 +266,11 @@ instance Monoid (Stream m a) where
266266-- Interleave
267267------------------------------------------------------------------------------
268268
269−interleave :: Stream m a -> Stream m a -> Stream m a
270−interleave m1 m2 = Stream $ \_ stp yld -> do
269+coserial :: Stream m a -> Stream m a -> Stream m a
270+coserial m1 m2 = Stream $ \_ stp yld -> do
271271 let stop = (runStream m2) Nothing stp yld
272272 yield a Nothing = yld a (Just m2)
273− yield a (Just r) = yld a (Just (interleave m2 r))
273+ yield a (Just r) = yld a (Just (coserial m2 r))
274274 (runStream m1) Nothing stop yield
275275
276276------------------------------------------------------------------------------
@@ -608,9 +608,9 @@ joinStreamVar2 style m1 m2 = Stream $ \st stp yld ->
608608-- Semigroup and Monoid style compositions for parallel actions
609609------------------------------------------------------------------------------
610610
611−{-# INLINE aparallel #-}
612−aparallel :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
613−aparallel = joinStreamVar2 (SVarStyle Disjunction LIFO)
611+{-# INLINE coparallel #-}
612+coparallel :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
613+coparallel = joinStreamVar2 (SVarStyle Disjunction LIFO)
614614
615615{-# INLINE parallel #-}
616616parallel :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
src/Streamly/Examples/ListDirRecursive.hs+3−3
@@ -3,15 +3,15 @@ module Streamly.Examples.ListDirRecursive where
33import Control.Monad.IO.Class (liftIO)
44import Path.IO (listDir, getCurrentDir)
55import System.IO (stdout, hSetBuffering, BufferMode(LineBuffering))
6−import Streamly (runStream, aparallely)
6+import Streamly (runStream, coparallely)
77
88-- | This example demonstrates that there is little difference between regular
99-- IO code and concurrent streamly code. You can just remove
10−-- 'runStream . aparallely' and this becomes your regular IO code.
10+-- 'runStream . coparallely' and this becomes your regular IO code.
1111listDirRecursive :: IO ()
1212listDirRecursive = do
1313 hSetBuffering stdout LineBuffering
14− runStream . aparallely $ getCurrentDir >>= readdir
14+ runStream . coparallely $ getCurrentDir >>= readdir
1515 where readdir d = do
1616 (ds, fs) <- liftIO $ listDir d
1717 liftIO $ mapM_ putStrLn $ map show fs ++ map show ds
src/Streamly/Streams.hs+36−36
@@ -48,9 +48,9 @@ module Streamly.Streams
4848 , async
4949
5050 -- * Merging Streams
51− , append
52− , interleave
53− , aparallel
51+ , serial
52+ , coserial
53+ , coparallel
5454 , parallel
5555 , (<=>) --deprecated
5656 , (<|) --deprecated
@@ -68,8 +68,8 @@ module Streamly.Streams
6868
6969 -- * Type Adapters
7070 , serially
71− , interleaving
72− , aparallely
71+ , coserially
72+ , coparallely
7373 , asyncly -- deprecated
7474 , parallely
7575 , zipping
@@ -336,9 +336,9 @@ type StreamT = SerialT
336336-- | Polymorphic version of the 'Semigroup' operation '<>' of 'SerialT'.
337337-- Appends two streams sequentially, yielding all elements from the first
338338-- stream, and then all elements from the second stream.
339−{-# INLINE append #-}
340−append :: IsStream t => t m a -> t m a -> t m a
341−append m1 m2 = fromStream $ S.append (toStream m1) (toStream m2)
339+{-# INLINE serial #-}
340+serial :: IsStream t => t m a -> t m a -> t m a
341+serial m1 m2 = fromStream $ S.serial (toStream m1) (toStream m2)
342342
343343------------------------------------------------------------------------------
344344-- Monad
@@ -469,20 +469,20 @@ instance IsStream InterleavedT where
469469
470470-- | Polymorphic version of the 'Semigroup' operation '<>' of 'InterleavedT'.
471471-- Interleaves two streams, yielding one element from each stream alternately.
472−{-# INLINE interleave #-}
473−interleave :: IsStream t => t m a -> t m a -> t m a
474−interleave m1 m2 = fromStream $ S.interleave (toStream m1) (toStream m2)
472+{-# INLINE coserial #-}
473+coserial :: IsStream t => t m a -> t m a -> t m a
474+coserial m1 m2 = fromStream $ S.coserial (toStream m1) (toStream m2)
475475
476476instance Semigroup (InterleavedT m a) where
477− (<>) = interleave
477+ (<>) = coserial
478478
479479infixr 5 <=>
480480
481−-- | Same as 'interleave'.
482−{-# Deprecated (<=>) "Please use '<>' of InterleavedT or 'interleave' instead." #-}
481+-- | Same as 'coserial'.
482+{-# DEPRECATED (<=>) "Please use 'coserial' instead." #-}
483483{-# INLINE (<=>) #-}
484484(<=>) :: IsStream t => t m a -> t m a -> t m a
485−(<=>) = interleave
485+(<=>) = coserial
486486
487487------------------------------------------------------------------------------
488488-- Monad
@@ -570,7 +570,7 @@ instance (Monad m, Floating a) => Floating (InterleavedT m a) where
570570-- enough for the consumer.
571571--
572572-- @
573−-- main = ('toList' . 'aparallely' $ (fromFoldable [1,2]) \<> (fromFoldable [3,4])) >>= print
573+-- main = ('toList' . 'coparallely' $ (fromFoldable [1,2]) \<> (fromFoldable [3,4])) >>= print
574574-- @
575575-- @
576576-- [1,2,3,4]
@@ -585,7 +585,7 @@ instance (Monad m, Floating a) => Floating (InterleavedT m a) where
585585-- import "Streamly"
586586-- import Control.Concurrent
587587--
588−-- main = 'runStream' . 'aparallely' $ do
588+-- main = 'runStream' . 'coparallely' $ do
589589-- n <- return 3 \<\> return 2 \<\> return 1
590590-- liftIO $ do
591591-- threadDelay (n * 1000000)
@@ -629,18 +629,18 @@ instance IsStream AParallelT where
629629-- | Polymorphic version of the 'Semigroup' operation '<>' of 'AParallelT', but
630630-- polymorphic. Merges two streams possibly concurrently, preferring the
631631-- elements from the left one when available.
632−{-# INLINE aparallel #-}
633−aparallel :: (IsStream t, MonadAsync m) => t m a -> t m a -> t m a
634−aparallel m1 m2 = fromStream $ S.aparallel (toStream m1) (toStream m2)
632+{-# INLINE coparallel #-}
633+coparallel :: (IsStream t, MonadAsync m) => t m a -> t m a -> t m a
634+coparallel m1 m2 = fromStream $ S.coparallel (toStream m1) (toStream m2)
635635
636636instance MonadAsync m => Semigroup (AParallelT m a) where
637− (<>) = aparallel
637+ (<>) = coparallel
638638
639−-- | Same as 'aparallel'.
640−{-# DEPRECATED (<|) "Please use 'aparallel' instead." #-}
639+-- | Same as 'coparallel'.
640+{-# DEPRECATED (<|) "Please use 'coparallel' instead." #-}
641641{-# INLINE (<|) #-}
642642(<|) :: (IsStream t, MonadAsync m) => t m a -> t m a -> t m a
643−(<|) = aparallel
643+(<|) = coparallel
644644
645645------------------------------------------------------------------------------
646646-- Monad
@@ -1074,17 +1074,17 @@ serially :: IsStream t => SerialT m a -> t m a
10741074serially = adapt
10751075
10761076-- | Fix the type of a polymorphic stream as 'InterleavedT'.
1077−interleaving :: IsStream t => InterleavedT m a -> t m a
1078−interleaving = adapt
1077+coserially :: IsStream t => InterleavedT m a -> t m a
1078+coserially = adapt
10791079
10801080-- | Fix the type of a polymorphic stream as 'AParallelT'.
1081−aparallely :: IsStream t => AParallelT m a -> t m a
1082−aparallely = adapt
1081+coparallely :: IsStream t => AParallelT m a -> t m a
1082+coparallely = adapt
10831083
1084−-- | Same as 'aparallely'.
1085−{-# DEPRECATED asyncly "Please use aparallely instead." #-}
1084+-- | Same as 'coparallely'.
1085+{-# DEPRECATED asyncly "Please use coparallely instead." #-}
10861086asyncly :: IsStream t => AParallelT m a -> t m a
1087−asyncly = aparallely
1087+asyncly = coparallely
10881088
10891089-- | Fix the type of a polymorphic stream as 'ParallelT'.
10901090parallely :: IsStream t => ParallelT m a -> t m a
@@ -1107,15 +1107,15 @@ zippingAsync = adapt
11071107runStreamT :: Monad m => SerialT m a -> m ()
11081108runStreamT = runStream
11091109
1110−-- | Same as @runStream . interleaving@.
1110+-- | Same as @runStream . coserially@.
11111111{-# DEPRECATED runInterleavedT "Please use 'runStream . interleaving' instead." #-}
11121112runInterleavedT :: Monad m => InterleavedT m a -> m ()
1113−runInterleavedT = runStream . interleaving
1113+runInterleavedT = runStream . coserially
11141114
1115−-- | Same as @runStream . aparallely@.
1116−{-# DEPRECATED runAsyncT "Please use 'runStream . aparallely' instead." #-}
1115+-- | Same as @runStream . coparallely@.
1116+{-# DEPRECATED runAsyncT "Please use 'runStream . coparallely' instead." #-}
11171117runAsyncT :: Monad m => AParallelT m a -> m ()
1118−runAsyncT = runStream . aparallely
1118+runAsyncT = runStream . coparallely
11191119
11201120-- | Same as @runStream . parallely@.
11211121{-# DEPRECATED runParallelT "Please use 'runStream . parallely' instead." #-}
test/Main.hs+38−38
@@ -20,10 +20,10 @@ toListSerial :: SerialT IO a -> IO [a]
2020toListSerial = A.toList . serially
2121
2222toListInterleaved :: InterleavedT IO a -> IO [a]
23−toListInterleaved = A.toList . interleaving
23+toListInterleaved = A.toList . coserially
2424
2525toListAsync :: AParallelT IO a -> IO [a]
26−toListAsync = A.toList . aparallely
26+toListAsync = A.toList . coparallely
2727
2828toListParallel :: ParallelT IO a -> IO [a]
2929toListParallel = A.toList . parallely
@@ -88,8 +88,8 @@ main = hspec $ do
8888 ---------------------------------------------------------------------------
8989
9090 describe "Serial Composition" $ compose serially mempty id
91− describe "Interleaved Composition" $ compose interleaving mempty sort
92− describe "Left biased parallel Composition" $ compose aparallely mempty sort
91+ describe "Interleaved Composition" $ compose coserially mempty sort
92+ describe "Left biased parallel Composition" $ compose coparallely mempty sort
9393 describe "Fair parallel Composition" $ compose parallely mempty sort
9494 describe "Semigroup Composition for ZipSerial" $ compose zipping mempty id
9595 describe "Semigroup Composition for ZipAsync" $ compose zippingAsync mempty id
@@ -98,9 +98,9 @@ main = hspec $ do
9898 -- Monoidal Composition ordering checks
9999 ---------------------------------------------------------------------------
100100
101− describe "Serial interleaved ordering check" $ interleaveCheck interleaving
101+ describe "Serial interleaved ordering check" $ interleaveCheck coserially
102102 describe "Parallel interleaved ordering check" $ interleaveCheck parallely
103− describe "Left biased parallel time order check" $ parallelCheck aparallely
103+ describe "Left biased parallel time order check" $ parallelCheck coparallely
104104 describe "Fair parallel time order check" $ parallelCheck parallely
105105
106106 ---------------------------------------------------------------------------
@@ -112,7 +112,7 @@ main = hspec $ do
112112
113113 describe "<> and <=>" $ composeAndComposeSimple
114114 serially
115− interleaving
115+ coserially
116116 ([ [1 .. 9]
117117 , [1 .. 9]
118118 , [1, 3, 2, 4, 6, 5, 7, 9, 8]
@@ -120,8 +120,8 @@ main = hspec $ do
120120 ])
121121
122122 describe "<=> and <=>" $ composeAndComposeSimple
123− interleaving
124− interleaving
123+ coserially
124+ coserially
125125 ([ [1, 4, 2, 7, 3, 5, 8, 6, 9]
126126 , [1, 7, 4, 8, 2, 9, 5, 3, 6]
127127 , [1, 4, 3, 7, 2, 6, 9, 5, 8]
@@ -129,7 +129,7 @@ main = hspec $ do
129129 ])
130130
131131 describe "<=> and <>" $ composeAndComposeSimple
132− interleaving
132+ coserially
133133 serially
134134 ([ [1, 4, 2, 7, 3, 5, 8, 6, 9]
135135 , [1, 7, 4, 8, 2, 9, 5, 3, 6]
@@ -183,7 +183,7 @@ main = hspec $ do
183183 ---------------------------------------------------------------------------
184184
185185 describe "Serial loops (<>)" $ loops serially id reverse
186− describe "Left biased parallel loops (<|)" $ loops aparallely sort sort
186+ describe "Left biased parallel loops (<|)" $ loops coparallely sort sort
187187 describe "Fair parallel loops (<|>)" $ loops parallely sort sort
188188
189189 ---------------------------------------------------------------------------
@@ -191,23 +191,23 @@ main = hspec $ do
191191 ---------------------------------------------------------------------------
192192
193193 describe "Bind and compose1" $ bindAndComposeSimple serially serially
194− describe "Bind and compose2" $ bindAndComposeSimple serially interleaving
195− describe "Bind and compose3" $ bindAndComposeSimple serially aparallely
194+ describe "Bind and compose2" $ bindAndComposeSimple serially coserially
195+ describe "Bind and compose3" $ bindAndComposeSimple serially coparallely
196196 describe "Bind and compose4" $ bindAndComposeSimple serially parallely
197197
198− describe "Bind and compose1" $ bindAndComposeSimple interleaving serially
199− describe "Bind and compose2" $ bindAndComposeSimple interleaving interleaving
200− describe "Bind and compose3" $ bindAndComposeSimple interleaving aparallely
201− describe "Bind and compose4" $ bindAndComposeSimple interleaving parallely
198+ describe "Bind and compose1" $ bindAndComposeSimple coserially serially
199+ describe "Bind and compose2" $ bindAndComposeSimple coserially coserially
200+ describe "Bind and compose3" $ bindAndComposeSimple coserially coparallely
201+ describe "Bind and compose4" $ bindAndComposeSimple coserially parallely
202202
203− describe "Bind and compose1" $ bindAndComposeSimple aparallely serially
204− describe "Bind and compose2" $ bindAndComposeSimple aparallely interleaving
205− describe "Bind and compose3" $ bindAndComposeSimple aparallely aparallely
206− describe "Bind and compose4" $ bindAndComposeSimple aparallely parallely
203+ describe "Bind and compose1" $ bindAndComposeSimple coparallely serially
204+ describe "Bind and compose2" $ bindAndComposeSimple coparallely coserially
205+ describe "Bind and compose3" $ bindAndComposeSimple coparallely coparallely
206+ describe "Bind and compose4" $ bindAndComposeSimple coparallely parallely
207207
208208 describe "Bind and compose1" $ bindAndComposeSimple parallely serially
209− describe "Bind and compose2" $ bindAndComposeSimple parallely interleaving
210− describe "Bind and compose3" $ bindAndComposeSimple parallely aparallely
209+ describe "Bind and compose2" $ bindAndComposeSimple parallely coserially
210+ describe "Bind and compose3" $ bindAndComposeSimple parallely coparallely
211211 describe "Bind and compose4" $ bindAndComposeSimple parallely parallely
212212
213213 let fldr, fldl :: (IsStream t, Semigroup (t IO Int)) => [t IO Int] -> t IO Int
@@ -217,36 +217,36 @@ main = hspec $ do
217217 forM_ [fldr, fldl] $ \k ->
218218 describe "Bind and compose" $ bindAndComposeHierarchy serially serially k
219219 forM_ [fldr, fldl] $ \k ->
220− describe "Bind and compose" $ bindAndComposeHierarchy serially interleaving k
220+ describe "Bind and compose" $ bindAndComposeHierarchy serially coserially k
221221 forM_ [fldr, fldl] $ \k ->
222− describe "Bind and compose" $ bindAndComposeHierarchy serially aparallely k
222+ describe "Bind and compose" $ bindAndComposeHierarchy serially coparallely k
223223 forM_ [fldr, fldl] $ \k ->
224224 describe "Bind and compose" $ bindAndComposeHierarchy serially parallely k
225225
226226 forM_ [fldr, fldl] $ \k ->
227− describe "Bind and compose" $ bindAndComposeHierarchy interleaving serially k
227+ describe "Bind and compose" $ bindAndComposeHierarchy coserially serially k
228228 forM_ [fldr, fldl] $ \k ->
229− describe "Bind and compose" $ bindAndComposeHierarchy interleaving interleaving k
229+ describe "Bind and compose" $ bindAndComposeHierarchy coserially coserially k
230230 forM_ [fldr, fldl] $ \k ->
231− describe "Bind and compose" $ bindAndComposeHierarchy interleaving aparallely k
231+ describe "Bind and compose" $ bindAndComposeHierarchy coserially coparallely k
232232 forM_ [fldr, fldl] $ \k ->
233− describe "Bind and compose" $ bindAndComposeHierarchy interleaving parallely k
233+ describe "Bind and compose" $ bindAndComposeHierarchy coserially parallely k
234234
235235 forM_ [fldr, fldl] $ \k ->
236− describe "Bind and compose" $ bindAndComposeHierarchy aparallely serially k
236+ describe "Bind and compose" $ bindAndComposeHierarchy coparallely serially k
237237 forM_ [fldr, fldl] $ \k ->
238− describe "Bind and compose" $ bindAndComposeHierarchy aparallely interleaving k
238+ describe "Bind and compose" $ bindAndComposeHierarchy coparallely coserially k
239239 forM_ [fldr, fldl] $ \k ->
240− describe "Bind and compose" $ bindAndComposeHierarchy aparallely aparallely k
240+ describe "Bind and compose" $ bindAndComposeHierarchy coparallely coparallely k
241241 forM_ [fldr, fldl] $ \k ->
242− describe "Bind and compose" $ bindAndComposeHierarchy aparallely parallely k
242+ describe "Bind and compose" $ bindAndComposeHierarchy coparallely parallely k
243243
244244 forM_ [fldr, fldl] $ \k ->
245245 describe "Bind and compose" $ bindAndComposeHierarchy parallely serially k
246246 forM_ [fldr, fldl] $ \k ->
247− describe "Bind and compose" $ bindAndComposeHierarchy parallely interleaving k
247+ describe "Bind and compose" $ bindAndComposeHierarchy parallely coserially k
248248 forM_ [fldr, fldl] $ \k ->
249− describe "Bind and compose" $ bindAndComposeHierarchy parallely aparallely k
249+ describe "Bind and compose" $ bindAndComposeHierarchy parallely coparallely k
250250 forM_ [fldr, fldl] $ \k ->
251251 describe "Bind and compose" $ bindAndComposeHierarchy parallely parallely k
252252
@@ -553,11 +553,11 @@ mixedOps = do
553553 x1 <- parallely $ return 1 <> return 2
554554 liftIO $ return ()
555555 liftIO $ putStr ""
556− y1 <- aparallely $ return 1 <> return 2
556+ y1 <- coparallely $ return 1 <> return 2
557557 z1 <- do
558558 x11 <- return 1 <> return 2
559− y11 <- aparallely $ return 1 <> return 2
560− z11 <- interleaving $ return 1 <> return 2
559+ y11 <- coparallely $ return 1 <> return 2
560+ z11 <- coserially $ return 1 <> return 2
561561 liftIO $ return ()
562562 liftIO $ putStr ""
563563 return (x11 + y11 + z11)
test/Prop.hs+34−34
@@ -316,10 +316,10 @@ main = hspec $ do
316316 describe "Functor operations" $ do
317317 functorOps A.fromFoldable "serially" serially (==)
318318 functorOps folded "serially folded" serially (==)
319− functorOps A.fromFoldable "interleaving" interleaving (==)
320− functorOps folded "interleaving folded" interleaving (==)
321− functorOps A.fromFoldable "aparallely" aparallely sortEq
322− functorOps folded "aparallely folded" aparallely sortEq
319+ functorOps A.fromFoldable "coserially" coserially (==)
320+ functorOps folded "coserially folded" coserially (==)
321+ functorOps A.fromFoldable "coparallely" coparallely sortEq
322+ functorOps folded "coparallely folded" coparallely sortEq
323323 functorOps A.fromFoldable "parallely" parallely sortEq
324324 functorOps folded "parallely folded" parallely sortEq
325325 functorOps A.fromFoldable "zipping" zipping (==)
@@ -329,8 +329,8 @@ main = hspec $ do
329329
330330 describe "Semigroup operations" $ do
331331 semigroupOps "serially" serially (==)
332− semigroupOps "interleaving" interleaving (==)
333− semigroupOps "aparallely" aparallely sortEq
332+ semigroupOps "coserially" coserially (==)
333+ semigroupOps "coparallely" coparallely sortEq
334334 semigroupOps "parallely" parallely sortEq
335335 semigroupOps "zipping" zipping (==)
336336 semigroupOps "zippingAsync" zippingAsync (==)
@@ -341,10 +341,10 @@ main = hspec $ do
341341 -- XXX applicative with three arguments
342342 prop "serially applicative" $ applicativeOps A.fromFoldable serially (==)
343343 prop "serially applicative folded" $ applicativeOps folded serially (==)
344− prop "interleaving applicative" $ applicativeOps A.fromFoldable interleaving sortEq
345− prop "interleaving applicative folded" $ applicativeOps folded interleaving sortEq
346− prop "aparallely applicative" $ applicativeOps A.fromFoldable aparallely sortEq
347− prop "aparallely applicative folded" $ applicativeOps folded aparallely sortEq
344+ prop "coserially applicative" $ applicativeOps A.fromFoldable coserially sortEq
345+ prop "coserially applicative folded" $ applicativeOps folded coserially sortEq
346+ prop "coparallely applicative" $ applicativeOps A.fromFoldable coparallely sortEq
347+ prop "coparallely applicative folded" $ applicativeOps folded coparallely sortEq
348348 prop "parallely applicative folded" $ applicativeOps folded parallely sortEq
349349
350350 describe "Zip operations" $ do
@@ -353,80 +353,80 @@ main = hspec $ do
353353 -- prop "zippingAsync applicative" $ zipApplicative zippingAsync (==)
354354 prop "zip monadic serially" $ zipMonadic A.fromFoldable serially (==)
355355 prop "zip monadic serially folded" $ zipMonadic folded serially (==)
356− prop "zip monadic interleaving" $ zipMonadic A.fromFoldable interleaving (==)
357− prop "zip monadic interleaving folded" $ zipMonadic folded interleaving (==)
358− prop "zip monadic aparallely" $ zipMonadic A.fromFoldable aparallely (==)
359− prop "zip monadic aparallely folded" $ zipMonadic folded aparallely (==)
356+ prop "zip monadic coserially" $ zipMonadic A.fromFoldable coserially (==)
357+ prop "zip monadic coserially folded" $ zipMonadic folded coserially (==)
358+ prop "zip monadic coparallely" $ zipMonadic A.fromFoldable coparallely (==)
359+ prop "zip monadic coparallely folded" $ zipMonadic folded coparallely (==)
360360 prop "zip monadic parallely" $ zipMonadic A.fromFoldable parallely (==)
361361 prop "zip monadic parallely folded" $ zipMonadic folded parallely (==)
362362
363363 describe "Monad operations" $ do
364364 prop "serially monad then" $ monadThen A.fromFoldable serially (==)
365− prop "interleaving monad then" $ monadThen A.fromFoldable interleaving sortEq
366− prop "aparallely monad then" $ monadThen A.fromFoldable aparallely sortEq
365+ prop "coserially monad then" $ monadThen A.fromFoldable coserially sortEq
366+ prop "coparallely monad then" $ monadThen A.fromFoldable coparallely sortEq
367367 prop "parallely monad then" $ monadThen A.fromFoldable parallely sortEq
368368
369369 prop "serially monad then folded" $ monadThen folded serially (==)
370− prop "interleaving monad then folded" $ monadThen folded interleaving sortEq
371− prop "aparallely monad then folded" $ monadThen folded aparallely sortEq
370+ prop "coserially monad then folded" $ monadThen folded coserially sortEq
371+ prop "coparallely monad then folded" $ monadThen folded coparallely sortEq
372372 prop "parallely monad then folded" $ monadThen folded parallely sortEq
373373
374374 prop "serially monad bind" $ monadBind A.fromFoldable serially (==)
375− prop "interleaving monad bind" $ monadBind A.fromFoldable interleaving sortEq
376− prop "aparallely monad bind" $ monadBind A.fromFoldable aparallely sortEq
375+ prop "coserially monad bind" $ monadBind A.fromFoldable coserially sortEq
376+ prop "coparallely monad bind" $ monadBind A.fromFoldable coparallely sortEq
377377 prop "parallely monad bind" $ monadBind A.fromFoldable parallely sortEq
378378
379379 describe "Stream transform operations" $ do
380380 transformOps A.fromFoldable "serially" serially (==)
381− transformOps A.fromFoldable "interleaving" interleaving (==)
381+ transformOps A.fromFoldable "coserially" coserially (==)
382382 transformOps A.fromFoldable "zipping" zipping (==)
383383 transformOps A.fromFoldable "zippingAsync" zippingAsync (==)
384− transformOps A.fromFoldable "aparallely" aparallely sortEq
384+ transformOps A.fromFoldable "coparallely" coparallely sortEq
385385 transformOps A.fromFoldable "parallely" parallely sortEq
386386
387387 transformOps folded "serially folded" serially (==)
388− transformOps folded "interleaving folded" interleaving (==)
388+ transformOps folded "coserially folded" coserially (==)
389389 transformOps folded "zipping folded" zipping (==)
390390 transformOps folded "zippingAsync folded" zippingAsync (==)
391− transformOps folded "aparallely folded" aparallely sortEq
391+ transformOps folded "coparallely folded" coparallely sortEq
392392 transformOps folded "parallely folded" parallely sortEq
393393
394394 transformOpsWord8 A.fromFoldable "serially" serially
395− transformOpsWord8 A.fromFoldable "interleaving" interleaving
395+ transformOpsWord8 A.fromFoldable "coserially" coserially
396396 transformOpsWord8 A.fromFoldable "zipping" zipping
397397 transformOpsWord8 A.fromFoldable "zippingAsync" zippingAsync
398− transformOpsWord8 A.fromFoldable "aparallely" aparallely
398+ transformOpsWord8 A.fromFoldable "coparallely" coparallely
399399 transformOpsWord8 A.fromFoldable "parallely" parallely
400400
401401 transformOpsWord8 folded "serially folded" serially
402− transformOpsWord8 folded "interleaving folded" interleaving
402+ transformOpsWord8 folded "coserially folded" coserially
403403 transformOpsWord8 folded "zipping folded" zipping
404404 transformOpsWord8 folded "zippingAsync folded" zippingAsync
405− transformOpsWord8 folded "aparallely folded" aparallely
405+ transformOpsWord8 folded "coparallely folded" coparallely
406406 transformOpsWord8 folded "parallely folded" parallely
407407
408408 describe "Stream elimination operations" $ do
409409 eliminationOps A.fromFoldable "serially" serially
410− eliminationOps A.fromFoldable "interleaving" interleaving
410+ eliminationOps A.fromFoldable "coserially" coserially
411411 eliminationOps A.fromFoldable "zipping" zipping
412412 eliminationOps A.fromFoldable "zippingAsync" zippingAsync
413− eliminationOps A.fromFoldable "aparallely" aparallely
413+ eliminationOps A.fromFoldable "coparallely" coparallely
414414 eliminationOps A.fromFoldable "parallely" parallely
415415
416416 eliminationOps folded "serially folded" serially
417− eliminationOps folded "interleaving folded" interleaving
417+ eliminationOps folded "coserially folded" coserially
418418 eliminationOps folded "zipping folded" zipping
419419 eliminationOps folded "zippingAsync folded" zippingAsync
420− eliminationOps folded "aparallely folded" aparallely
420+ eliminationOps folded "coparallely folded" coparallely
421421 eliminationOps folded "parallely folded" parallely
422422
423423 describe "Stream elimination operations" $ do
424424 serialEliminationOps A.fromFoldable "serially" serially
425− serialEliminationOps A.fromFoldable "interleaving" interleaving
425+ serialEliminationOps A.fromFoldable "coserially" coserially
426426 serialEliminationOps A.fromFoldable "zipping" zipping
427427 serialEliminationOps A.fromFoldable "zippingAsync" zippingAsync
428428
429429 serialEliminationOps folded "serially folded" serially
430− serialEliminationOps folded "interleaving folded" interleaving
430+ serialEliminationOps folded "coserially folded" coserially
431431 serialEliminationOps folded "zipping folded" zipping
432432 serialEliminationOps folded "zippingAsync folded" zippingAsync