on master help sign in
Minor doc fixes
commit74c3785866d1f19d0cc8b55ff80c2b30e75efe88 authorHarendra Kumar <harendra.kumar@gmail.com> dateMon 4 Dec 2017, 02:44 (9 years ago) parentb0faa34
2 files changed+5−4
src/Streamly.hs+3−2 src/Streamly/Streams.hs+2−2
src/Streamly.hs+3−2
@@ -219,6 +219,7 @@ import Control.Monad.Trans.Class (MonadTrans (..))
219219-- one of the following combinators to specify what type of stream you mean.
220220--
221221-- This code:
222+--
222223-- @
223224-- main = ('toList' $ (return 1 <> return 2)) >>= print
224225-- @
@@ -229,10 +230,10 @@ import Control.Monad.Trans.Class (MonadTrans (..))
229230-- Ambiguous type variable ‘t0’ arising from a use of ...
230231-- @
231232--
232−-- To fix the error:
233+-- To fix the error just tell 'toList' what kind of stream are we feeding it:
233234--
234235-- @
235−-- main = ('toList' . 'serially' $ (return 1 <> return 2)) >>= print
236+-- main = ('toList' $ 'serially' $ (return 1 <> return 2)) >>= print
236237-- @
237238-- @
238239-- main = ('toList' $ (return 1 <> return 2 :: StreamT IO Int)) >>= print
src/Streamly/Streams.hs+2−2
@@ -201,8 +201,8 @@ async m = do
201201-- liftIO $ print x
202202-- @
203203-- @
204−-- "1"
205−-- "2"
204+-- 1
205+-- 2
206206-- @
207207--
208208-- 'StreamT' nests streams serially in a depth first manner.