@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12{-# LANGUAGE UndecidableInstances #-}
23-- |
34-- Module : Streamly.Internal.Data.Stream.StreamK.Type
@@ -163,15 +164,7 @@ import qualified Prelude
163164import Prelude hiding
164165 (map, mapM, concatMap, foldr, repeat, null, reverse, tail, init)
165166
166−-- $setup
167−-- >>> import Data.Function (fix, (&))
168−-- >>> import Data.Semigroup (cycle1)
169−-- >>> import Streamly.Internal.Data.Stream.StreamK (CrossStreamK(..))
170−-- >>> import qualified Streamly.Data.Fold as Fold
171−-- >>> import qualified Streamly.Data.Stream as Stream
172−-- >>> import qualified Streamly.Data.StreamK as StreamK
173−-- >>> import qualified Streamly.Internal.Data.Stream.StreamK as StreamK
174−-- >>> import qualified Streamly.Internal.FileSystem.Dir as Dir
167+#include "DocTestDataStreamK.hs"
175168
176169------------------------------------------------------------------------------
177170-- Basic stream type
@@ -315,7 +308,7 @@ nilM m = mkStream $ \_ _ _ stp -> m *> stp
315308
316309-- | Create a singleton stream from a pure value.
317310--
318−-- >>> fromPure a = a `cons` StreamK.nil
311+-- >>> fromPure a = a `StreamK.cons` StreamK.nil
319312-- >>> fromPure = pure
320313-- >>> fromPure = StreamK.fromEffect . pure
321314--
@@ -325,7 +318,7 @@ fromPure a = mkStream $ \_ _ single _ -> single a
325318
326319-- | Create a singleton stream from a monadic action.
327320--
328−-- >>> fromEffect m = m `consM` StreamK.nil
321+-- >>> fromEffect m = m `StreamK.consM` StreamK.nil
329322--
330323-- >>> Stream.fold Fold.drain $ StreamK.toStream $ StreamK.fromEffect (putStrLn "hello")
331324-- hello
@@ -343,7 +336,7 @@ infixr 5 `consM`
343336-- | A right associative prepend operation to add an effectful value at the
344337-- head of an existing stream::
345338--
346−-- >>> s = putStrLn "hello" `consM` putStrLn "world" `consM` StreamK.nil
339+-- >>> s = putStrLn "hello" `StreamK.consM` putStrLn "world" `StreamK.consM` StreamK.nil
347340-- >>> Stream.fold Fold.drain (StreamK.toStream s)
348341-- hello
349342-- world