on master help sign in
Remove refrences of Streamly.Prelude from core
commit5efab7df4555fc40c9ac08ed4bdf1812674a5961 authorAdithya Kumar <adithya@composewell.com> dateFri 4 Nov 2022, 14:51 (4 years ago) parent4eda9d0
7 files changed+22−23
core/src/Streamly/FileSystem/Handle.hs+5−5 core/src/Streamly/Internal/Data/Array/Stream.hs+1−1 core/src/Streamly/Internal/Data/Parser.hs+1−1 core/src/Streamly/Internal/Data/Pipe.hs+2−2 core/src/Streamly/Internal/Data/Refold/Type.hs+1−1 core/src/Streamly/Internal/Data/Unfold.hs+2−2 core/src/Streamly/Unicode/Stream.hs+10−11
core/src/Streamly/FileSystem/Handle.hs+5−5
@@ -17,13 +17,13 @@
1717-- The 'TextEncoding', 'NewLineMode', and 'Buffering' options of the underlying
1818-- GHC 'Handle' are ignored by these APIs. Please use @Streamly.Unicode.*@
1919-- modules for encoding and decoding a byte stream, use stream splitting
20−-- operations in "Streamly.Prelude" to create a stream of lines or to split the
21−-- input stream on any other type of boundaries.
20+-- operations in "Streamly.Data.Stream" to create a stream of lines or to split
21+-- the input stream on any other type of boundaries.
2222--
2323-- To set the read or write start position use 'hSeek' on the 'Handle', the
24−-- 'Streamly.Prelude.before' combinator may be used to do that on a streaming
25−-- combinator. To restrict the length of read or write use the stream trimming
26−-- operations like 'Streamly.Prelude.take'.
24+-- 'Streamly.Data.Stream.before' combinator may be used to do that on a
25+-- streaming combinator. To restrict the length of read or write use the stream
26+-- trimming operations like 'Streamly.Data.Stream.take'.
2727--
2828-- Note that a 'Handle' is inherently stateful, therefore, we cannot use these
2929-- APIs from multiple threads without serialization; reading or writing in one
core/src/Streamly/Internal/Data/Array/Stream.hs+1−1
@@ -1144,7 +1144,7 @@ runArrayFoldManyD
11441144-- | Apply an 'ArrayFold' repeatedly on an array stream and emit the
11451145-- fold outputs in the output stream.
11461146--
1147−-- See "Streamly.Prelude.foldMany" for more details.
1147+-- See "Streamly.Data.Stream.foldMany" for more details.
11481148--
11491149-- /Pre-release/
11501150{-# INLINE runArrayFoldMany #-}
core/src/Streamly/Internal/Data/Parser.hs+1−1
@@ -1077,7 +1077,7 @@ regexPCRE = undefined
10771077-- operation fails if any of the parsers fail.
10781078--
10791079-- Note: This is a parsing dual of appending streams using
1080−-- 'Streamly.Prelude.serial', it splits the streams using two parsers and zips
1080+-- 'Streamly.Data.Stream.append', it splits the streams using two parsers and zips
10811081-- the results.
10821082--
10831083-- This implementation is strict in the second argument, therefore, the
core/src/Streamly/Internal/Data/Pipe.hs+2−2
@@ -7,7 +7,7 @@
77-- Portability : GHC
88--
99-- There are three fundamental types in streamly. They are streams
10−-- ("Streamly.Prelude"), pipes ("Streamly.Internal.Data.Pipe") and folds ("Streamly.Data.Fold").
10+-- ("Streamly.Data.Stream"), pipes ("Streamly.Internal.Data.Pipe") and folds ("Streamly.Data.Fold").
1111-- Streams are sources or producers of values, multiple sources can be merged
1212-- into a single source but a source cannot be split into multiple stream
1313-- sources. Folds are sinks or consumers, a stream can be split and
@@ -255,7 +255,7 @@ import Streamly.Internal.Data.Pipe.Type
255255-- import Streamly.Internal.Data.Strict
256256
257257-- import qualified Streamly.Internal.Data.Array.Type as A
258−-- import qualified Streamly.Prelude as S
258+-- import qualified Streamly.Data.Stream as S
259259-- import qualified Streamly.Internal.Data.Stream.StreamD as D
260260-- import qualified Streamly.Internal.Data.Stream.StreamK as K
261261-- import qualified Streamly.Internal.Data.Stream.Common as P
core/src/Streamly/Internal/Data/Refold/Type.hs+1−1
@@ -76,7 +76,7 @@ data Refold m c a b =
7676-- If your 'Fold' returns only 'Partial' (i.e. never returns a 'Done') then you
7777-- can use @foldl'*@ constructors.
7878--
79−-- See also: @Streamly.Prelude.foldl'@
79+-- See also: @Streamly.Data.Fold.foldl'@
8080--
8181-- /Internal/
8282--
core/src/Streamly/Internal/Data/Unfold.hs+2−2
@@ -95,9 +95,9 @@
9595-- optimization when merging, appending or concatenating multiple streams.
9696-- Even though stream based combinator have excellent performance, they are
9797-- much less efficient when compared to combinators using 'Unfold'. For
98−-- example, the 'Streamly.Prelude.concatMap' combinator which uses @a -> t m b@
98+-- example, the 'Streamly.Data.Stream.concatMap' combinator which uses @a -> t m b@
9999-- (where @t@ is a stream type) to generate streams is much less efficient
100−-- compared to 'Streamly.Prelude.unfoldMany'.
100+-- compared to 'Streamly.Data.Stream.unfoldMany'.
101101--
102102-- On the other hand, transformation operations on stream types are as
103103-- efficient as transformations on 'Unfold'.
core/src/Streamly/Unicode/Stream.hs+10−11
@@ -14,9 +14,9 @@
1414-- A byte stream of Unicode text read from an IO device or from an
1515-- 'Streamly.Data.Array.Array' in memory can be decoded into a 'Char' stream
1616-- using the decoding routines in this module. A 'String' (@[Char]@) can be
17−-- converted into a 'Char' stream using 'Streamly.Prelude.fromList'. An @Array
18−-- Char@ can be 'Streamly.Prelude.unfold'ed into a stream using the array
19−-- 'Streamly.Data.Array.read' unfold.
17+-- converted into a 'Char' stream using 'Streamly.Data.Stream.fromList'. An
18+-- @Array Char@ can be 'Streamly.Data.Stream.unfold'ed into a stream using the
19+-- array 'Streamly.Data.Array.read' unfold.
2020--
2121-- = Storing Unicode Strings
2222--
@@ -25,14 +25,13 @@
2525-- memory.
2626--
2727-- If you have to store a 'Char' stream in memory you can convert it into a
28−-- 'String' using 'Streamly.Prelude.toList' or using the
29−-- 'Streamly.Data.Fold.toList' fold. The 'String' type can be more efficient
30−-- than pinned arrays for short and short lived strings.
31−--
32−-- For longer or long lived streams you can 'Streamly.Prelude.fold' the 'Char'
33−-- stream as @Array Char@ using the array 'Streamly.Data.Array.write' fold.
34−-- The 'Array' type provides a more compact representation and pinned memory
35−-- reducing GC overhead. If space efficiency is a concern you can use
28+-- 'String' using 'Streamly.Data.Fold.toList' fold. The 'String' type can be
29+-- more efficient than pinned arrays for short and short lived strings.
30+--
31+-- For longer or long lived streams you can 'Streamly.Data.Stream.fold' the
32+-- 'Char' stream as @Array Char@ using the array 'Streamly.Data.Array.write'
33+-- fold. The 'Array' type provides a more compact representation and pinned
34+-- memory reducing GC overhead. If space efficiency is a concern you can use
3635-- 'encodeUtf8'' on the 'Char' stream before writing it to an 'Array' providing
3736-- an even more compact representation.
3837--