on master help sign in
Fix doctest in "sequence" operation
commit12c90b17e1c87b89aa1f2382cfe65e2ad57a6b8d authorHarendra Kumar <harendra@composewell.com> dateWed 29 Sep 2021, 20:36 (5 years ago) parent68317a4
1 file changed+7−4
src/Streamly/Internal/Data/Stream/IsStream/Transform.hs+7−4
src/Streamly/Internal/Data/Stream/IsStream/Transform.hs+7−4
@@ -282,6 +282,9 @@ import Prelude hiding
282282-- >>> import Streamly.Internal.Data.Stream.IsStream as Stream
283283-- >>> import qualified Streamly.Data.Fold as Fold
284284-- >>> import qualified Streamly.Internal.Data.Fold as Fold
285+-- >>> import System.IO (stdout, hSetBuffering, BufferMode(LineBuffering))
286+--
287+-- >>> hSetBuffering stdout LineBuffering
285288
286289------------------------------------------------------------------------------
287290-- Piping
@@ -415,19 +418,19 @@ mapMSerial = Serial.mapM
415418-- abc
416419--
417420-- >>> :{
418−-- drain $ Stream.replicateM 10 (return $ threadDelay 1000000 >> print 1)
421+-- drain $ Stream.replicateM 3 (return $ threadDelay 1000000 >> print 1)
419422-- & (fromSerial . Stream.sequence)
420423-- :}
421424-- 1
422−-- ...
425+-- 1
423426-- 1
424427--
425428-- >>> :{
426−-- drain $ Stream.replicateM 10 (return $ threadDelay 1000000 >> print 1)
429+-- drain $ Stream.replicateM 3 (return $ threadDelay 1000000 >> print 1)
427430-- & (fromAsync . Stream.sequence)
428431-- :}
429432-- 1
430−-- ...
433+-- 1
431434-- 1
432435--
433436-- @