on master help sign in
Fix missing nomenclature changes
9c9b279Harendra Kumar
Changelog.md+1
@@ -22,6 +22,7 @@
22 always fixed at all exits.
22 always fixed at all exits.
23 * Change the type combinators (e.g. `parallely`) to only fix the argument
23 * Change the type combinators (e.g. `parallely`) to only fix the argument
24 stream type and the output stream type remains polymorphic.
24 stream type and the output stream type remains polymorphic.
25+
25 Stream types may have to be changed or type combinators may have to be added
26 Stream types may have to be changed or type combinators may have to be added
26 or removed to adapt to this change.
27 or removed to adapt to this change.
27* Change the type of `foldrM` to make it consistent with `foldrM` in base.
28* Change the type of `foldrM` to make it consistent with `foldrM` in base.
src/Streamly/Core.hs+2−2
@@ -672,8 +672,8 @@ toStreamVar sv m = do
672--
672--
673-- TBD Note 2: We may want to run computations at the lower level of the
673-- TBD Note 2: We may want to run computations at the lower level of the
674-- composition tree serially even when they are composed using a parallel
674-- composition tree serially even when they are composed using a parallel
675−-- combinator. We can use 'splice' in place of 'async' and 'cosplice' in
675+-- combinator. We can use 'serial' in place of 'async' and 'wSerial' in
676−-- place of 'coParAhead'. If we find that an SVar immediately above a computation
676+-- place of 'wAsync'. If we find that an SVar immediately above a computation
677-- gets drained empty we can switch to parallelizing the computation. For that
677-- gets drained empty we can switch to parallelizing the computation. For that
678-- we can use a state flag to fork the rest of the computation at any point of
678-- we can use a state flag to fork the rest of the computation at any point of
679-- time inside the Monad bind operation if the consumer is running at a faster
679-- time inside the Monad bind operation if the consumer is running at a faster
test/Main.hs+27−27
@@ -105,19 +105,19 @@ main = hspec $ do
105 -- describe "Parallel (<>) ordering check" $ interleaveCheck parallely (<>)
105 -- describe "Parallel (<>) ordering check" $ interleaveCheck parallely (<>)
106 -- describe "Parallel mappend ordering check" $ interleaveCheck parallely mappend
106 -- describe "Parallel mappend ordering check" $ interleaveCheck parallely mappend
107
107
108− describe "ParAhead (<>) time order check" $ parallelCheck asyncly (<>)
108+ describe "Async (<>) time order check" $ parallelCheck asyncly (<>)
109− describe "ParAhead mappend time order check" $ parallelCheck asyncly mappend
109+ describe "Async mappend time order check" $ parallelCheck asyncly mappend
110− describe "CoparAhead (<>) time order check" $ parallelCheck wAsyncly (<>)
110+ describe "WAsync (<>) time order check" $ parallelCheck wAsyncly (<>)
111− describe "CoparAhead mappend time order check" $ parallelCheck wAsyncly mappend
111+ describe "WAsync mappend time order check" $ parallelCheck wAsyncly mappend
112
112
113 ---------------------------------------------------------------------------
113 ---------------------------------------------------------------------------
114 -- Monoidal Compositions, multiset equality checks
114 -- Monoidal Compositions, multiset equality checks
115 ---------------------------------------------------------------------------
115 ---------------------------------------------------------------------------
116
116
117 describe "Serial Composition" $ compose serially mempty id
117 describe "Serial Composition" $ compose serially mempty id
118− describe "Interleaved Composition" $ compose wSerially mempty sort
118+ describe "WSerial Composition" $ compose wSerially mempty sort
119− describe "ParAhead Composition" $ compose asyncly mempty sort
119+ describe "Async Composition" $ compose asyncly mempty sort
120− describe "CoparAhead Composition" $ compose wAsyncly mempty sort
120+ describe "WAsync Composition" $ compose wAsyncly mempty sort
121 describe "Parallel Composition" $ compose parallely mempty sort
121 describe "Parallel Composition" $ compose parallely mempty sort
122 describe "Semigroup Composition for ZipSerial" $ compose zipSerially mempty id
122 describe "Semigroup Composition for ZipSerial" $ compose zipSerially mempty id
123 describe "Semigroup Composition for ZipAsync" $ compose zipAsyncly mempty id
123 describe "Semigroup Composition for ZipAsync" $ compose zipAsyncly mempty id
@@ -203,8 +203,8 @@ main = hspec $ do
203 ---------------------------------------------------------------------------
203 ---------------------------------------------------------------------------
204
204
205 describe "Serial loops" $ loops serially id reverse
205 describe "Serial loops" $ loops serially id reverse
206− describe "ParAhead parallel loops" $ loops asyncly sort sort
206+ describe "Async parallel loops" $ loops asyncly sort sort
207− describe "coparAhead loops" $ loops wAsyncly sort sort
207+ describe "WAsync loops" $ loops wAsyncly sort sort
208 describe "parallel loops" $ loops parallely sort sort
208 describe "parallel loops" $ loops parallely sort sort
209
209
210 ---------------------------------------------------------------------------
210 ---------------------------------------------------------------------------
@@ -223,17 +223,17 @@ main = hspec $ do
223 describe "Bind and compose Costream 4" $ bindAndComposeSimple wSerially wAsyncly
223 describe "Bind and compose Costream 4" $ bindAndComposeSimple wSerially wAsyncly
224 describe "Bind and compose Costream 5" $ bindAndComposeSimple wSerially parallely
224 describe "Bind and compose Costream 5" $ bindAndComposeSimple wSerially parallely
225
225
226− describe "Bind and compose ParAhead 1" $ bindAndComposeSimple asyncly serially
226+ describe "Bind and compose Async 1" $ bindAndComposeSimple asyncly serially
227− describe "Bind and compose ParAhead 2" $ bindAndComposeSimple asyncly wSerially
227+ describe "Bind and compose Async 2" $ bindAndComposeSimple asyncly wSerially
228− describe "Bind and compose ParAhead 3" $ bindAndComposeSimple asyncly asyncly
228+ describe "Bind and compose Async 3" $ bindAndComposeSimple asyncly asyncly
229− describe "Bind and compose ParAhead 4" $ bindAndComposeSimple asyncly wAsyncly
229+ describe "Bind and compose Async 4" $ bindAndComposeSimple asyncly wAsyncly
230− describe "Bind and compose ParAhead 5" $ bindAndComposeSimple asyncly parallely
230+ describe "Bind and compose Async 5" $ bindAndComposeSimple asyncly parallely
231
231
232− describe "Bind and compose CoparAhead 1" $ bindAndComposeSimple wAsyncly serially
232+ describe "Bind and compose WAsync 1" $ bindAndComposeSimple wAsyncly serially
233− describe "Bind and compose CoparAhead 2" $ bindAndComposeSimple wAsyncly wSerially
233+ describe "Bind and compose WAsync 2" $ bindAndComposeSimple wAsyncly wSerially
234− describe "Bind and compose CoparAhead 3" $ bindAndComposeSimple wAsyncly asyncly
234+ describe "Bind and compose WAsync 3" $ bindAndComposeSimple wAsyncly asyncly
235− describe "Bind and compose CoparAhead 4" $ bindAndComposeSimple wAsyncly wAsyncly
235+ describe "Bind and compose WAsync 4" $ bindAndComposeSimple wAsyncly wAsyncly
236− describe "Bind and compose CoparAhead 5" $ bindAndComposeSimple wAsyncly parallely
236+ describe "Bind and compose WAsync 5" $ bindAndComposeSimple wAsyncly parallely
237
237
238 describe "Bind and compose Parallel 1" $ bindAndComposeSimple parallely serially
238 describe "Bind and compose Parallel 1" $ bindAndComposeSimple parallely serially
239 describe "Bind and compose Parallel 2" $ bindAndComposeSimple parallely wSerially
239 describe "Bind and compose Parallel 2" $ bindAndComposeSimple parallely wSerially
@@ -303,14 +303,14 @@ main = hspec $ do
303 -- Nest two lists using different styles of product compositions
303 -- Nest two lists using different styles of product compositions
304 it "Nests two streams using monadic serial composition" nestTwoSerial
304 it "Nests two streams using monadic serial composition" nestTwoSerial
305 it "Nests two streams using monadic interleaved composition" nestTwoInterleaved
305 it "Nests two streams using monadic interleaved composition" nestTwoInterleaved
306− it "Nests two streams using monadic parAhead composition" nestTwoAsync
306+ it "Nests two streams using monadic Async composition" nestTwoAsync
307− it "Nests two streams using monadic CoparAhead composition" nestTwoCoparAhead
307+ it "Nests two streams using monadic WAsync composition" nestTwoWAsync
308 it "Nests two streams using monadic parallel composition" nestTwoParallel
308 it "Nests two streams using monadic parallel composition" nestTwoParallel
309
309
310 it "Nests two streams using applicative serial composition" nestTwoSerialApp
310 it "Nests two streams using applicative serial composition" nestTwoSerialApp
311 it "Nests two streams using applicative interleaved composition" nestTwoInterleavedApp
311 it "Nests two streams using applicative interleaved composition" nestTwoInterleavedApp
312− it "Nests two streams using applicative parAhead composition" nestTwoAsyncApp
312+ it "Nests two streams using applicative Async composition" nestTwoAsyncApp
313− it "Nests two streams using applicative CoparAhead composition" nestTwoCoparAheadApp
313+ it "Nests two streams using applicative WAsync composition" nestTwoWAsyncApp
314 it "Nests two streams using applicative parallel composition" nestTwoParallelApp
314 it "Nests two streams using applicative parallel composition" nestTwoParallelApp
315
315
316 ---------------------------------------------------------------------------
316 ---------------------------------------------------------------------------
@@ -474,8 +474,8 @@ nestTwoAsyncApp =
474 in (toListAsync ((+) <$> s1 <*> s2) >>= return . sort)
474 in (toListAsync ((+) <$> s1 <*> s2) >>= return . sort)
475 `shouldReturn` sort ([6,7,8,9,7,8,9,10,8,9,10,11,9,10,11,12] :: [Int])
475 `shouldReturn` sort ([6,7,8,9,7,8,9,10,8,9,10,11,9,10,11,12] :: [Int])
476
476
477−nestTwoCoparAhead :: Expectation
477+nestTwoWAsync :: Expectation
478−nestTwoCoparAhead =
478+nestTwoWAsync =
479 let s1 = foldMapWith (<>) return [1..4]
479 let s1 = foldMapWith (<>) return [1..4]
480 s2 = foldMapWith (<>) return [5..8]
480 s2 = foldMapWith (<>) return [5..8]
481 in ((A.toList . wAsyncly) (do
481 in ((A.toList . wAsyncly) (do
@@ -496,8 +496,8 @@ nestTwoParallel =
496 ) >>= return . sort)
496 ) >>= return . sort)
497 `shouldReturn` sort ([6,7,7,8,8,8,9,9,9,9,10,10,10,11,11,12] :: [Int])
497 `shouldReturn` sort ([6,7,7,8,8,8,9,9,9,9,10,10,10,11,11,12] :: [Int])
498
498
499−nestTwoCoparAheadApp :: Expectation
499+nestTwoWAsyncApp :: Expectation
500−nestTwoCoparAheadApp =
500+nestTwoWAsyncApp =
501 let s1 = foldMapWith (<>) return [1..4]
501 let s1 = foldMapWith (<>) return [1..4]
502 s2 = foldMapWith (<>) return [5..8]
502 s2 = foldMapWith (<>) return [5..8]
503 in ((A.toList . wAsyncly) ((+) <$> s1 <*> s2) >>= return . sort)
503 in ((A.toList . wAsyncly) ((+) <$> s1 <*> s2) >>= return . sort)