on master help sign in
Fix missing nomenclature changes
commit9c9b27949c433a8450f290dae7dc2065e26b9f01 authorHarendra Kumar <harendra.kumar@gmail.com> dateSun 13 May 2018, 11:05 (8 years ago) parent56cb8e6
3 files changed+30−29
Changelog.md+1 src/Streamly/Core.hs+2−2 test/Main.hs+27−27
Changelog.md+1
@@ -22,6 +22,7 @@
2222 always fixed at all exits.
2323 * Change the type combinators (e.g. `parallely`) to only fix the argument
2424 stream type and the output stream type remains polymorphic.
25+
2526 Stream types may have to be changed or type combinators may have to be added
2627 or removed to adapt to this change.
2728* 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
672672--
673673-- TBD Note 2: We may want to run computations at the lower level of the
674674-- composition tree serially even when they are composed using a parallel
675−-- combinator. We can use 'splice' in place of 'async' and 'cosplice' in
676−-- place of 'coParAhead'. If we find that an SVar immediately above a computation
675+-- combinator. We can use 'serial' in place of 'async' and 'wSerial' in
676+-- place of 'wAsync'. If we find that an SVar immediately above a computation
677677-- gets drained empty we can switch to parallelizing the computation. For that
678678-- we can use a state flag to fork the rest of the computation at any point of
679679-- 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
105105 -- describe "Parallel (<>) ordering check" $ interleaveCheck parallely (<>)
106106 -- describe "Parallel mappend ordering check" $ interleaveCheck parallely mappend
107107
108− describe "ParAhead (<>) time order check" $ parallelCheck asyncly (<>)
109− describe "ParAhead mappend time order check" $ parallelCheck asyncly mappend
110− describe "CoparAhead (<>) time order check" $ parallelCheck wAsyncly (<>)
111− describe "CoparAhead mappend time order check" $ parallelCheck wAsyncly mappend
108+ describe "Async (<>) time order check" $ parallelCheck asyncly (<>)
109+ describe "Async mappend time order check" $ parallelCheck asyncly mappend
110+ describe "WAsync (<>) time order check" $ parallelCheck wAsyncly (<>)
111+ describe "WAsync mappend time order check" $ parallelCheck wAsyncly mappend
112112
113113 ---------------------------------------------------------------------------
114114 -- Monoidal Compositions, multiset equality checks
115115 ---------------------------------------------------------------------------
116116
117117 describe "Serial Composition" $ compose serially mempty id
118− describe "Interleaved Composition" $ compose wSerially mempty sort
119− describe "ParAhead Composition" $ compose asyncly mempty sort
120− describe "CoparAhead Composition" $ compose wAsyncly mempty sort
118+ describe "WSerial Composition" $ compose wSerially mempty sort
119+ describe "Async Composition" $ compose asyncly mempty sort
120+ describe "WAsync Composition" $ compose wAsyncly mempty sort
121121 describe "Parallel Composition" $ compose parallely mempty sort
122122 describe "Semigroup Composition for ZipSerial" $ compose zipSerially mempty id
123123 describe "Semigroup Composition for ZipAsync" $ compose zipAsyncly mempty id
@@ -203,8 +203,8 @@ main = hspec $ do
203203 ---------------------------------------------------------------------------
204204
205205 describe "Serial loops" $ loops serially id reverse
206− describe "ParAhead parallel loops" $ loops asyncly sort sort
207− describe "coparAhead loops" $ loops wAsyncly sort sort
206+ describe "Async parallel loops" $ loops asyncly sort sort
207+ describe "WAsync loops" $ loops wAsyncly sort sort
208208 describe "parallel loops" $ loops parallely sort sort
209209
210210 ---------------------------------------------------------------------------
@@ -223,17 +223,17 @@ main = hspec $ do
223223 describe "Bind and compose Costream 4" $ bindAndComposeSimple wSerially wAsyncly
224224 describe "Bind and compose Costream 5" $ bindAndComposeSimple wSerially parallely
225225
226− describe "Bind and compose ParAhead 1" $ bindAndComposeSimple asyncly serially
227− describe "Bind and compose ParAhead 2" $ bindAndComposeSimple asyncly wSerially
228− describe "Bind and compose ParAhead 3" $ bindAndComposeSimple asyncly asyncly
229− describe "Bind and compose ParAhead 4" $ bindAndComposeSimple asyncly wAsyncly
230− describe "Bind and compose ParAhead 5" $ bindAndComposeSimple asyncly parallely
226+ describe "Bind and compose Async 1" $ bindAndComposeSimple asyncly serially
227+ describe "Bind and compose Async 2" $ bindAndComposeSimple asyncly wSerially
228+ describe "Bind and compose Async 3" $ bindAndComposeSimple asyncly asyncly
229+ describe "Bind and compose Async 4" $ bindAndComposeSimple asyncly wAsyncly
230+ describe "Bind and compose Async 5" $ bindAndComposeSimple asyncly parallely
231231
232− describe "Bind and compose CoparAhead 1" $ bindAndComposeSimple wAsyncly serially
233− describe "Bind and compose CoparAhead 2" $ bindAndComposeSimple wAsyncly wSerially
234− describe "Bind and compose CoparAhead 3" $ bindAndComposeSimple wAsyncly asyncly
235− describe "Bind and compose CoparAhead 4" $ bindAndComposeSimple wAsyncly wAsyncly
236− describe "Bind and compose CoparAhead 5" $ bindAndComposeSimple wAsyncly parallely
232+ describe "Bind and compose WAsync 1" $ bindAndComposeSimple wAsyncly serially
233+ describe "Bind and compose WAsync 2" $ bindAndComposeSimple wAsyncly wSerially
234+ describe "Bind and compose WAsync 3" $ bindAndComposeSimple wAsyncly asyncly
235+ describe "Bind and compose WAsync 4" $ bindAndComposeSimple wAsyncly wAsyncly
236+ describe "Bind and compose WAsync 5" $ bindAndComposeSimple wAsyncly parallely
237237
238238 describe "Bind and compose Parallel 1" $ bindAndComposeSimple parallely serially
239239 describe "Bind and compose Parallel 2" $ bindAndComposeSimple parallely wSerially
@@ -303,14 +303,14 @@ main = hspec $ do
303303 -- Nest two lists using different styles of product compositions
304304 it "Nests two streams using monadic serial composition" nestTwoSerial
305305 it "Nests two streams using monadic interleaved composition" nestTwoInterleaved
306− it "Nests two streams using monadic parAhead composition" nestTwoAsync
307− it "Nests two streams using monadic CoparAhead composition" nestTwoCoparAhead
306+ it "Nests two streams using monadic Async composition" nestTwoAsync
307+ it "Nests two streams using monadic WAsync composition" nestTwoWAsync
308308 it "Nests two streams using monadic parallel composition" nestTwoParallel
309309
310310 it "Nests two streams using applicative serial composition" nestTwoSerialApp
311311 it "Nests two streams using applicative interleaved composition" nestTwoInterleavedApp
312− it "Nests two streams using applicative parAhead composition" nestTwoAsyncApp
313− it "Nests two streams using applicative CoparAhead composition" nestTwoCoparAheadApp
312+ it "Nests two streams using applicative Async composition" nestTwoAsyncApp
313+ it "Nests two streams using applicative WAsync composition" nestTwoWAsyncApp
314314 it "Nests two streams using applicative parallel composition" nestTwoParallelApp
315315
316316 ---------------------------------------------------------------------------
@@ -474,8 +474,8 @@ nestTwoAsyncApp =
474474 in (toListAsync ((+) <$> s1 <*> s2) >>= return . sort)
475475 `shouldReturn` sort ([6,7,8,9,7,8,9,10,8,9,10,11,9,10,11,12] :: [Int])
476476
477−nestTwoCoparAhead :: Expectation
478−nestTwoCoparAhead =
477+nestTwoWAsync :: Expectation
478+nestTwoWAsync =
479479 let s1 = foldMapWith (<>) return [1..4]
480480 s2 = foldMapWith (<>) return [5..8]
481481 in ((A.toList . wAsyncly) (do
@@ -496,8 +496,8 @@ nestTwoParallel =
496496 ) >>= return . sort)
497497 `shouldReturn` sort ([6,7,7,8,8,8,9,9,9,9,10,10,10,11,11,12] :: [Int])
498498
499−nestTwoCoparAheadApp :: Expectation
500−nestTwoCoparAheadApp =
499+nestTwoWAsyncApp :: Expectation
500+nestTwoWAsyncApp =
501501 let s1 = foldMapWith (<>) return [1..4]
502502 s2 = foldMapWith (<>) return [5..8]
503503 in ((A.toList . wAsyncly) ((+) <$> s1 <*> s2) >>= return . sort)