@@ -14,35 +14,45 @@
14-- Stability : experimental
14-- Stability : experimental
15-- Portability : GHC
15-- Portability : GHC
17+-- Functions with the suffix @M@ are general functions that work on monadic
18+-- arguments. The corresponding functions without the suffix @M@ work on pure
19+-- arguments and can in general be derived from their monadic versions but are
20+-- provided for convenience and for consistency with other pure APIs in the
23+-- Deconstruction and folds accept a 'StreamT' type instead of a polymorphic
24+-- type to ensure that streams always have a concrete monomorphic type by
25+-- default, reducing type errors. In case you want to use any other type of
26+-- stream you can use one of the type combinators provided in the "Streamly"
27+-- module to convert the stream type.
18module Streamly.Prelude
29module Streamly.Prelude
20− -- * Construction and Deconstruction
31+ -- * Construction
21 -- | Primitives to construct or inspect a stream.
32 -- | Primitives to construct or inspect a stream.
30− -- * Generation
39+ -- * General Unfold
31− -- | Generate a monadic stream from an input structure, a seed or a
32− -- generation function.
34 , unfoldrM
41 , unfoldrM
43+ -- * Special Generation
44+ -- | Generate a monadic stream from an input structure, a seed or a
45+ -- generation function.
36 , iterateM
49 , iterateM
38 , fromFoldable
50 , fromFoldable
40− -- * Folding
52+ -- * Deconstruction
41− -- | Folds accept a 'StreamT' type instead of a polymorphic type to ensure
53+ , uncons
42− -- that streams have a monomorphic type by default. In case you want to use
43− -- any other type of stream you can use one of the type combinators to
44− -- convert the stream type before passing to a fold function.
46 -- ** General Folds
56 -- ** General Folds