on master help sign in
Make some minor changes to Stream.Prelude docs
commite6cc89b385b7edc00b09b47b4a4dba40bf03ca41 authorHarendra Kumar <harendra@composewell.com> dateSun 26 Nov 2023, 10:38 (3 years ago) parent5864899
4 files changed+25−18
src/Streamly/Data/Stream/Concurrent.hs+7−6 src/Streamly/Data/Stream/Exception.hs−1 src/Streamly/Data/Stream/Prelude.hs+18−10 src/Streamly/Data/Stream/Time.hs−1
src/Streamly/Data/Stream/Concurrent.hs+7−6
@@ -17,8 +17,9 @@
1717
1818module Streamly.Data.Stream.Concurrent
1919 (
20− -- * Concurrency
2120 -- $concurrency
21+
22+ -- ** Types
2223 MonadAsync
2324
2425 -- ** Configuration
@@ -110,7 +111,7 @@ import Prelude hiding (mapM, sequence, concat, concatMap, zipWith)
110111
111112-- $concurrency
112113--
113−-- == Concurrency Channels
114+-- == Channels
114115--
115116-- At a lower level, concurrency is implemented using channels that support
116117-- concurrent evaluation of streams. We create a channel, and add one or more
@@ -118,7 +119,7 @@ import Prelude hiding (mapM, sequence, concat, concatMap, zipWith)
118119-- generates a single output stream from the results. How the streams are
119120-- combined depends on the configuration of the channel.
120121--
121−-- == Concurrency Primitives
122+-- == Primitives
122123--
123124-- There are only a few fundamental abstractions for concurrency, 'parEval',
124125-- 'parConcatMap', and 'parConcatIterate', all concurrency combinators can be
@@ -139,7 +140,7 @@ import Prelude hiding (mapM, sequence, concat, concatMap, zipWith)
139140-- function recursively over the stream. This can be used to traverse trees or
140141-- graphs.
141142--
142−-- == Concurrency Configuration
143+-- == Configuration
143144--
144145-- Concurrent combinators take a 'Config' argument which controls the
145146-- concurrent behavior. For example, maximum number of threads to be used
@@ -158,7 +159,7 @@ import Prelude hiding (mapM, sequence, concat, concatMap, zipWith)
158159-- documentation for the default behavior and default values of configuration
159160-- parameters.
160161--
161−-- == Scheduling behavior
162+-- == Scheduling
162163--
163164-- The most important configuration option is to control whether the output of
164165-- the concurrent execution is consumed in the same order as the corresponding
@@ -174,7 +175,7 @@ import Prelude hiding (mapM, sequence, concat, concatMap, zipWith)
174175-- if the stream consumer thread blocks it does not make any impact on the
175176-- scheduling of the available tasks.
176177--
177−-- == Concurrent Combinators
178+-- == Combinators
178179--
179180-- Using the few fundamental concurrency primitives we can implement all the
180181-- usual streaming combinators with concurrent behavior. Combinators like
src/Streamly/Data/Stream/Exception.hs−1
@@ -13,7 +13,6 @@
1313--
1414module Streamly.Data.Stream.Exception
1515 (
16− -- * Lifted Exceptions
1716 after
1817 , bracket
1918 -- , bracket3
src/Streamly/Data/Stream/Prelude.hs+18−10
@@ -6,20 +6,28 @@
66-- Stability : experimental
77-- Portability : GHC
88--
9−-- This module re-exports the "Streamly.Data.Stream" module from the
10−-- "streamly-core" package and additionally provides concurrency, time and
11−-- lifted exception operations as well in a single module.
12−--
13−-- Also see the following modules for more pre-release operations:
14−--
15−-- * "Streamly.Internal.Data.Stream.Concurrent"
16−-- * "Streamly.Internal.Data.Stream.Time"
17−-- * "Streamly.Internal.Data.Stream.Exception.Lifted"
9+-- All Stream related combinators including the streamly-core
10+-- "Streamly.Data.Stream" module, concurrency, time and lifted
11+-- exception operations.
1812--
1913module Streamly.Data.Stream.Prelude
20− ( module Streamly.Data.Stream
14+ (
15+ -- * "Streamly.Data.Stream"
16+ -- | All "Streamly.Data.Stream" combinators are re-exported via this
17+ -- module. For more pre-release combinators also see
18+ -- "Streamly.Internal.Data.Stream" module.
19+ module Streamly.Data.Stream
20+ -- * Concurrent Operations
21+ -- | Also see "Streamly.Internal.Data.Stream.Concurrent" for more
22+ -- pre-release functions.
2123 , module Streamly.Data.Stream.Concurrent
24+ -- * Time Related
25+ -- | Also see "Streamly.Internal.Data.Stream.Time" for more pre-release
26+ -- functions.
2227 , module Streamly.Data.Stream.Time
28+ -- * Lifted Exceptions
29+ -- | Also see "Streamly.Internal.Data.Stream.Exception.Lifted" for more
30+ -- pre-release functions.
2331 , module Streamly.Data.Stream.Exception
2432 )
2533where
src/Streamly/Data/Stream/Time.hs−1
@@ -15,7 +15,6 @@
1515--
1616module Streamly.Data.Stream.Time
1717 (
18− -- * Time
1918 -- ** Timers
2019 interject
2120