@@ -192,7 +192,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
192-- represents a single IO action whereas the 'Serial' monad represents a series
192-- represents a single IO action whereas the 'Serial' monad represents a series
193-- of IO actions. The only change you need to make to go from 'IO' to 'Serial'
193-- of IO actions. The only change you need to make to go from 'IO' to 'Serial'
194-- is to use 'drain' to run the monad and to prefix the IO actions with
194-- is to use 'drain' to run the monad and to prefix the IO actions with
195−-- either 'yieldM' or 'liftIO'. If you use liftIO you can switch from 'Serial'
195+-- either 'fromEffect' or 'liftIO'. If you use liftIO you can switch from 'Serial'
196-- to IO monad by simply removing the 'drain' function; no other changes
196-- to IO monad by simply removing the 'drain' function; no other changes
197-- are needed unless you have used some stream specific composition or
197-- are needed unless you have used some stream specific composition or
198-- combinators.
198-- combinators.
@@ -364,7 +364,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
366-- To create a singleton stream from a pure value use 'fromPure' or 'pure' and to
366-- To create a singleton stream from a pure value use 'fromPure' or 'pure' and to
367−-- create a singleton stream from a monadic action use 'yieldM'. Note that in
367+-- create a singleton stream from a monadic action use 'fromEffect'. Note that in
368-- case of Zip applicative streams "pure" repeats the value to generate an
368-- case of Zip applicative streams "pure" repeats the value to generate an
369-- infinite stream.
369-- infinite stream.
@@ -373,7 +373,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
374-- > S.'toList' $ S.'fromPure' 1
374-- > S.'toList' $ S.'fromPure' 1
376−-- > S.'toList' $ S.'yieldM' 'getLine'
376+-- > S.'toList' $ S.'fromEffect' 'getLine'
378-- ["hello"]
378-- ["hello"]
@@ -529,7 +529,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
529-- seconds. After the delay it prints the number of seconds it slept.
529-- seconds. After the delay it prints the number of seconds it slept.
532−-- delay n = S.'yieldM' $ do
532+-- delay n = S.'fromEffect' $ do
533-- threadDelay (n * 1000000)
533-- threadDelay (n * 1000000)
534-- tid \<- myThreadId
534-- tid \<- myThreadId
535-- putStrLn (show tid ++ ": Delay " ++ show n)
535-- putStrLn (show tid ++ ": Delay " ++ show n)
@@ -760,7 +760,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
762-- main = S.'drain' . S.'fromAsync' $ traced (sqrt 9) '<>' traced (sqrt 16) '<>' traced (sqrt 25)
762-- main = S.'drain' . S.'fromAsync' $ traced (sqrt 9) '<>' traced (sqrt 16) '<>' traced (sqrt 25)
763−-- where traced m = S.'yieldM' (myThreadId >>= print) >> return m
763+-- where traced m = S.'fromEffect' (myThreadId >>= print) >> return m
766-- ThreadId 40
766-- ThreadId 40
@@ -882,7 +882,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
882-- google = get "https://www.google.com/search?q=haskell"
882-- google = get "https://www.google.com/search?q=haskell"
883-- bing = get "https://www.bing.com/search?q=haskell"
883-- bing = get "https://www.bing.com/search?q=haskell"
884-- duckduckgo = get "https://www.duckduckgo.com/?q=haskell"
884-- duckduckgo = get "https://www.duckduckgo.com/?q=haskell"
885−-- get s = S.'yieldM' (httpNoBody (parseRequest_ s) >> putStrLn (show s))
885+-- get s = S.'fromEffect' (httpNoBody (parseRequest_ s) >> putStrLn (show s))
888-- The polymorphic version of the binary operation '<>' of the 'Parallel' type
888-- The polymorphic version of the binary operation '<>' of the 'Parallel' type
@@ -941,7 +941,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
941-- S.'drain' $ S.'concatFoldableWith' S.'async' (map delay [1..10])
941-- S.'drain' $ S.'concatFoldableWith' S.'async' (map delay [1..10])
942-- S.'drain' $ S.'concatMapFoldableWith' S.'async' delay [1..10]
942-- S.'drain' $ S.'concatMapFoldableWith' S.'async' delay [1..10]
943-- S.'drain' $ S.'concatForFoldableWith' S.'async' [1..10] delay
943-- S.'drain' $ S.'concatForFoldableWith' S.'async' [1..10] delay
944−-- where delay n = S.'yieldM' $ threadDelay (n * 1000000) >> print n
944+-- where delay n = S.'fromEffect' $ threadDelay (n * 1000000) >> print n
947-- $nesting
947-- $nesting
@@ -1011,7 +1011,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
1012-- import Control.Monad (forever)
1012-- import Control.Monad (forever)
1014−-- main = S.'drain' $ forever $ S.'yieldM' getLine >>= S.'yieldM' . putStrLn
1014+-- main = S.'drain' $ forever $ S.'fromEffect' getLine >>= S.'fromEffect' . putStrLn
1017-- When multiple streams are composed using this style they nest in a DFS
1017-- When multiple streams are composed using this style they nest in a DFS
@@ -1025,7 +1025,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
1025-- main = S.'drain' $ do
1025-- main = S.'drain' $ do
1026-- x <- S.'fromFoldable' [1,2]
1026-- x <- S.'fromFoldable' [1,2]
1027-- y <- S.'fromFoldable' [3,4]
1027-- y <- S.'fromFoldable' [3,4]
1028−-- S.'yieldM' $ putStrLn $ show (x, y)
1028+-- S.'fromEffect' $ putStrLn $ show (x, y)
@@ -1119,7 +1119,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
1119-- main = S.'drain' . S.'fromAsync' $ do
1119-- main = S.'drain' . S.'fromAsync' $ do
1120-- x <- S.'fromFoldable' [1,2]
1120-- x <- S.'fromFoldable' [1,2]
1121-- y <- S.'fromFoldable' [3,4]
1121-- y <- S.'fromFoldable' [3,4]
1122−-- S.'yieldM' $ putStrLn $ show (x, y)
1122+-- S.'fromEffect' $ putStrLn $ show (x, y)
@@ -1143,7 +1143,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
1143-- main = S.'drain' . S.'fromWSerial' $ do
1143-- main = S.'drain' . S.'fromWSerial' $ do
1144-- x <- S.'fromFoldable' [1,2]
1144-- x <- S.'fromFoldable' [1,2]
1145-- y <- S.'fromFoldable' [3,4]
1145-- y <- S.'fromFoldable' [3,4]
1146−-- S.yieldM $ putStrLn $ show (x, y)
1146+-- S.fromEffect $ putStrLn $ show (x, y)
@@ -1170,7 +1170,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
1170-- main = S.'drain' . S.'fromWAsync' $ do
1170-- main = S.'drain' . S.'fromWAsync' $ do
1171-- x <- S.'fromFoldable' [1,2]
1171-- x <- S.'fromFoldable' [1,2]
1172-- y <- S.'fromFoldable' [3,4]
1172-- y <- S.'fromFoldable' [3,4]
1173−-- S.'yieldM' $ putStrLn $ show (x, y)
1173+-- S.'fromEffect' $ putStrLn $ show (x, y)
@@ -1217,7 +1217,7 @@ import Control.Monad.Trans.Class (MonadTrans (lift))
1217-- sz <- sizes
1217-- sz <- sizes
1218-- cl <- colors
1218-- cl <- colors
1219-- sh <- shapes
1219-- sh <- shapes
1220−-- S.'yieldM' $ putStrLn $ show (sz, cl, sh)
1220+-- S.'fromEffect' $ putStrLn $ show (sz, cl, sh)