@@ -1,12 +1,12 @@
11{-# OPTIONS_GHC -fno-warn-unused-imports #-}
22-- |
3−-- Module : Asyncly.Tutorial
3+-- Module : Streamly.Tutorial
44-- Copyright : (c) 2017 Harendra Kumar
55--
66-- License : BSD3
77-- Maintainer : harendra.kumar@gmail.com
88--
9−-- Asyncly combines streaming, logic programming, concurrency and reactive
9+-- Streamly combines streaming, logic programming, concurrency and reactive
1010-- programming under a single abstraction with a concise API, giving
1111-- programmers a simple yet powerful tool for wide variety of applications.
1212--
@@ -26,18 +26,18 @@
2626-- iterations of a loop, '>>|' runs iterations in parallel and '>|>' runs all
2727-- iterations in fairly parallel manner.
2828--
29−-- With asyncly you can write concurrent and streaming applications without
29+-- With streamly you can write concurrent and streaming applications without
3030-- being aware of threads or synchronization. No explicit thread control is
3131-- needed, where applicable the concurrency rate is automatically controlled
3232-- based on the demand by the consumer. However, combinators are provided to
3333-- fine tune the concurrency control. Streaming and concurrency allows
34−-- expressing reactive applications conveniently. See 'Asyncly.Examples' for a
34+-- expressing reactive applications conveniently. See 'Streamly.Examples' for a
3535-- simple SDL based FRP example.
3636--
37−-- For examples and other ways to use the library see 'Asyncly.Examples' as
37+-- For examples and other ways to use the library see 'Streamly.Examples' as
3838-- well.
3939--
40−module Asyncly.Tutorial
40+module Streamly.Tutorial
4141 (
4242 -- * AsyncT Monad Transformer
4343 -- $transformer
@@ -116,9 +116,9 @@ module Asyncly.Tutorial
116116 )
117117where
118118
119−import Asyncly.Core
120−import Asyncly.Prelude
121−-- import Asyncly.Examples
119+import Streamly.Core
120+import Streamly.Prelude
121+-- import Streamly.Examples
122122import Data.Semigroup
123123import Control.Applicative
124124import Control.Monad
@@ -156,7 +156,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
156156-- to deconstruct an 'AsyncT' stream into head and tail.
157157--
158158-- @
159−-- import Asyncly
159+-- import Streamly
160160--
161161-- main = do
162162-- runAsyncly $ liftIO $ putStrLn "Hello world!"
@@ -174,7 +174,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
174174-- specified by the argument in seconds and then prints the argument.
175175--
176176-- @
177−-- import Asyncly
177+-- import Streamly
178178-- import Control.Concurrent
179179--
180180-- traced m = liftIO (myThreadId >>= print) >> m
@@ -289,7 +289,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
289289-- name of the search engine as a response arrives:
290290--
291291-- @
292−-- import Asyncly
292+-- import Streamly
293293-- import Network.HTTP.Simple
294294--
295295-- main = runAsyncly $ google \<|> bing \<|> duckduckgo
@@ -309,7 +309,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
309309-- Take an example of a merge sort of two sorted streams. We need to keep
310310-- consuming items from the stream which has the lowest item in the sort order.
311311-- This can be achieved using async references to streams. See
312−-- 'Asyncly.Examples.MergeSortedStreams'.
312+-- 'Streamly.Examples.MergeSortedStreams'.
313313
314314-- $monoid
315315--
@@ -324,7 +324,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
324324-- the function argument.
325325--
326326-- @
327−-- import Asyncly
327+-- import Streamly
328328--
329329-- main = do
330330-- runAsyncly $ liftIO $ putStrLn "Hello world!"
@@ -352,7 +352,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
352352-- all elements of the stream using 'fmap'.
353353--
354354-- @
355−-- import Asyncly
355+-- import Streamly
356356--
357357-- main = do
358358-- let nums = foldMapWith (<>) return [1..10]
@@ -395,7 +395,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
395395-- loop:
396396--
397397-- @
398−-- import Asyncly
398+-- import Streamly
399399-- import Data.Semigroup (cycle1)
400400--
401401-- main = runAsyncly $ do
@@ -430,7 +430,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
430430-- example:
431431--
432432-- @
433−-- import Asyncly
433+-- import Streamly
434434--
435435-- main = runAsyncly $
436436-- sizes >-> \\sz ->
@@ -449,7 +449,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
449449-- $concurrentNesting
450450--
451451-- @
452−-- import Asyncly
452+-- import Streamly
453453-- import System.IO (stdout, hSetBuffering, BufferMode(LineBuffering))
454454-- import Control.Concurrent
455455--
@@ -476,7 +476,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
476476-- $fairlyConcurrentNesting
477477--
478478-- @
479−-- import Asyncly
479+-- import Streamly
480480-- import System.IO (stdout, hSetBuffering, BufferMode(LineBuffering))
481481-- import Control.Concurrent
482482--
@@ -516,7 +516,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
516516-- sum and print them serially:
517517--
518518-- @
519−-- import Asyncly
519+-- import Streamly
520520-- import Data.List (sum)
521521--
522522-- main = do
@@ -529,7 +529,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
529529-- monadic bind.
530530--
531531-- @
532−-- import Asyncly
532+-- import Streamly
533533-- import Data.List (sum)
534534--
535535-- main = do
@@ -544,7 +544,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
544544-- Let us see a reactive programming example:
545545--
546546-- @
547−-- import Asyncly
547+-- import Streamly
548548-- import Control.Concurrent (threadDelay)
549549-- import Control.Monad (when)
550550-- import Control.Monad.State
@@ -588,13 +588,13 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
588588
589589-- $comparison
590590--
591−-- Even though asyncly covers all that is provided by the 'async' package or
591+-- Even though streamly covers all that is provided by the 'async' package or
592592-- most of what is provided by the 'streaming', 'pipes' or 'conduit' packages,
593−-- I would not say that it renders those useless. Asyncly is like monad if
593+-- I would not say that it renders those useless. Streamly is like monad if
594594-- 'async' is applicative and monads and applicatives both have their use
595595-- cases. It can completely repalce 'async', the ZipAsync type is equivalent to
596596-- the functionality provided by 'async'.
597597--
598−-- pipes and conduit are like Arrows and asyncly is like monad to them. You
598+-- pipes and conduit are like Arrows and streamly is like monad to them. You
599599-- would use pipes and conduit when you do not need the product style
600600-- composition and the implicit concurrency.