on master help sign in
Minor doc fixes
74c3785Harendra Kumar
src/Streamly.hs+3−2
@@ -219,6 +219,7 @@ import Control.Monad.Trans.Class (MonadTrans (..))
219-- one of the following combinators to specify what type of stream you mean.
219-- one of the following combinators to specify what type of stream you mean.
220--
220--
221-- This code:
221-- This code:
222+--
222-- @
223-- @
223-- main = ('toList' $ (return 1 <> return 2)) >>= print
224-- main = ('toList' $ (return 1 <> return 2)) >>= print
224-- @
225-- @
@@ -229,10 +230,10 @@ import Control.Monad.Trans.Class (MonadTrans (..))
229-- Ambiguous type variable ‘t0’ arising from a use of ...
230-- Ambiguous type variable ‘t0’ arising from a use of ...
230-- @
231-- @
231--
232--
232−-- To fix the error:
233+-- To fix the error just tell 'toList' what kind of stream are we feeding it:
233--
234--
234-- @
235-- @
235−-- main = ('toList' . 'serially' $ (return 1 <> return 2)) >>= print
236+-- main = ('toList' $ 'serially' $ (return 1 <> return 2)) >>= print
236-- @
237-- @
237-- @
238-- @
238-- main = ('toList' $ (return 1 <> return 2 :: StreamT IO Int)) >>= print
239-- main = ('toList' $ (return 1 <> return 2 :: StreamT IO Int)) >>= print
src/Streamly/Streams.hs+2−2
@@ -201,8 +201,8 @@ async m = do
201-- liftIO $ print x
201-- liftIO $ print x
202-- @
202-- @
203-- @
203-- @
204−-- "1"
204+-- 1
205−-- "2"
205+-- 2
206-- @
206-- @
207--
207--
208-- 'StreamT' nests streams serially in a depth first manner.
208-- 'StreamT' nests streams serially in a depth first manner.