on master help sign in
Replace /Internal/ annotation to /Pre-release/
commit305f89b512ecad39f52431ceb91c8cbdae70e9bc authorRanjeet Kumar Ranjan <ranjeetr@composewell.com> dateThu 4 Mar 2021, 13:24 (6 years ago) parent171907e
50 files changed+515−514
src/Streamly/Internal/Control/Exception.hs+3−3 src/Streamly/Internal/Control/Monad.hs+1−1 src/Streamly/Internal/Data/Array/Foreign.hs+15−15 src/Streamly/Internal/Data/Array/Foreign/Mut/Types.hs+5−5 src/Streamly/Internal/Data/Array/Foreign/Types.hs+8−8 src/Streamly/Internal/Data/Array/Prim/MutTypesInclude.hs+4−4 src/Streamly/Internal/Data/Array/Prim/TypesInclude.hs+6−6 src/Streamly/Internal/Data/Array/PrimInclude.hs+12−12 src/Streamly/Internal/Data/Array/Stream/Foreign.hs+2−2 src/Streamly/Internal/Data/Array/Stream/Mut/Foreign.hs+1−1 src/Streamly/Internal/Data/Binary/Decode.hs+12−12 src/Streamly/Internal/Data/Cont.hs+1−1 src/Streamly/Internal/Data/Fold.hs+13−13 src/Streamly/Internal/Data/Fold/Tee.hs+1−1 src/Streamly/Internal/Data/Fold/Types.hs+19−18 src/Streamly/Internal/Data/IOFinalizer.hs+4−4 src/Streamly/Internal/Data/IORef/Prim.hs+6−6 src/Streamly/Internal/Data/Parser.hs+33−33 src/Streamly/Internal/Data/Parser/ParserD.hs+21−21 src/Streamly/Internal/Data/Parser/ParserD/Types.hs+13−13 src/Streamly/Internal/Data/Parser/ParserK/Types.hs+9−9 src/Streamly/Internal/Data/Producer.hs+2−2 src/Streamly/Internal/Data/Producer/Source.hs+5−5 src/Streamly/Internal/Data/Producer/Type.hs+6−6 src/Streamly/Internal/Data/Stream/Async.hs+2−2 src/Streamly/Internal/Data/Stream/IsStream/Combinators.hs+1−1 src/Streamly/Internal/Data/Stream/IsStream/Common.hs+8−8 src/Streamly/Internal/Data/Stream/IsStream/Eliminate.hs+10−10 src/Streamly/Internal/Data/Stream/IsStream/Exception.hs+4−4 src/Streamly/Internal/Data/Stream/IsStream/Generate.hs+5−5 src/Streamly/Internal/Data/Stream/IsStream/Nesting.hs+37−37 src/Streamly/Internal/Data/Stream/IsStream/Top.hs+11−11 src/Streamly/Internal/Data/Stream/IsStream/Transform.hs+31−31 src/Streamly/Internal/Data/Stream/Parallel.hs+7−7 src/Streamly/Internal/Data/Stream/Serial.hs+1−1 src/Streamly/Internal/Data/Stream/StreamD/Exception.hs+2−2 src/Streamly/Internal/Data/Stream/StreamK.hs+3−3 src/Streamly/Internal/Data/Stream/StreamK/Type.hs+1−1 src/Streamly/Internal/Data/Unfold.hs+32−32 src/Streamly/Internal/Data/Unfold/Types.hs+4−4 src/Streamly/Internal/FileSystem/Dir.hs+3−3 src/Streamly/Internal/FileSystem/Event/Darwin.hs+36−36 src/Streamly/Internal/FileSystem/Event/Linux.hs+52−52 src/Streamly/Internal/FileSystem/Event/Windows.hs+23−23 src/Streamly/Internal/FileSystem/File.hs+10−10 src/Streamly/Internal/FileSystem/Handle.hs+8−8 src/Streamly/Internal/Network/Inet/TCP.hs+7−7 src/Streamly/Internal/Network/Socket.hs+4−4 src/Streamly/Internal/Unicode/Char.hs+1−1 src/Streamly/Internal/Unicode/Stream.hs+10−10
src/Streamly/Internal/Control/Exception.hs+3−3
@@ -21,7 +21,7 @@ import Control.Exception (assert)
2121-- Like 'assert' but returns @()@ in an 'Applicative' context so that it can be
2222-- used as an independent statement in a @do@ block.
2323--
24−-- /Internal/
24+-- /Pre-release/
2525--
2626{-# INLINE assertM #-}
2727assertM :: Applicative f => Bool -> f ()
@@ -30,7 +30,7 @@ assertM predicate = assert predicate (pure ())
3030-- | Like 'assert' but is not removed by the compiler, it is always present in
3131-- production code.
3232--
33−-- /Internal/
33+-- /Pre-release/
3434--
3535{-# INLINE verify #-}
3636verify :: Bool -> a -> a
@@ -43,7 +43,7 @@ verify predicate val =
4343-- Like 'verify' but returns @()@ in an 'Applicative' context so that it can be
4444-- used as an independent statement in a @do@ block.
4545--
46−-- /Internal/
46+-- /Pre-release/
4747--
4848{-# INLINE verifyM #-}
4949verifyM :: Applicative f => Bool -> f ()
src/Streamly/Internal/Control/Monad.hs+1−1
@@ -19,7 +19,7 @@ import Control.Monad.Catch (MonadCatch, catch, SomeException)
1919
2020-- | Discard any exceptions or value returned by an effectful action.
2121--
22−-- /Internal/
22+-- /Pre-release/
2323--
2424{-# INLINE discard #-}
2525discard :: MonadCatch m => m b -> m ()
src/Streamly/Internal/Data/Array/Foreign.hs+15−15
@@ -183,7 +183,7 @@ import qualified Streamly.Internal.Ring.Foreign as RB
183183-- allocated to size N, if the stream terminates before N elements then the
184184-- array may hold less than N elements.
185185--
186−-- /Internal/
186+-- /Pre-release/
187187{-# INLINE fromStreamN #-}
188188fromStreamN :: (MonadIO m, Storable a) => Int -> SerialT m a -> m (Array a)
189189fromStreamN n m = do
@@ -198,7 +198,7 @@ fromStreamN n m = do
198198-- may fail. When the stream size is not known, `arraysOf` followed by
199199-- processing of indvidual arrays in the resulting stream should be preferred.
200200--
201−-- /Internal/
201+-- /Pre-release/
202202{-# INLINE fromStream #-}
203203fromStream :: (MonadIO m, Storable a) => SerialT m a -> m (Array a)
204204fromStream = P.foldOnce A.write
@@ -228,7 +228,7 @@ producer = Producer.translate A.unsafeThaw A.unsafeFreeze MA.producer
228228-- for which this was written, "read" proves to be faster even though the core
229229-- generated with unsafeRead looks simpler.
230230--
231−-- /Internal/
231+-- /Pre-release/
232232--
233233{-# INLINE_NORMAL unsafeRead #-}
234234unsafeRead :: forall m a. (Monad m, Storable a) => Unfold m (Array a) a
@@ -256,14 +256,14 @@ unsafeRead = Unfold step inject
256256
257257-- | > null arr = length arr == 0
258258--
259−-- /Internal/
259+-- /Pre-release/
260260{-# INLINE null #-}
261261null :: Storable a => Array a -> Bool
262262null arr = length arr == 0
263263
264264-- | > last arr = readIndex arr (length arr - 1)
265265--
266−-- /Internal/
266+-- /Pre-release/
267267{-# INLINE last #-}
268268last :: Storable a => Array a -> Maybe a
269269last arr = readIndex arr (length arr - 1)
@@ -395,7 +395,7 @@ foldbWith level f = undefined
395395
396396-- | /O(1)/ Lookup the element at the given index, starting from 0.
397397--
398−-- /Internal/
398+-- /Pre-release/
399399{-# INLINE readIndex #-}
400400readIndex :: Storable a => Array a -> Int -> Maybe a
401401readIndex arr i =
@@ -429,7 +429,7 @@ readSliceRev arr i len = undefined
429429-- | /O(1)/ Write the given element at the given index in the array.
430430-- Performs in-place mutation of the array.
431431--
432−-- /Internal/
432+-- /Pre-release/
433433{-# INLINE writeIndex #-}
434434writeIndex :: (MonadIO m, Storable a) => Array a -> Int -> a -> m ()
435435writeIndex arr i a = do
@@ -487,7 +487,7 @@ runPipe f arr = P.runPipe (toArrayMinChunk (length arr)) $ f (A.read arr)
487487-- | Transform an array into another array using a stream transformation
488488-- operation.
489489--
490−-- /Internal/
490+-- /Pre-release/
491491{-# INLINE streamTransform #-}
492492streamTransform :: forall m a b. (MonadIO m, Storable a, Storable b)
493493 => (SerialT m a -> SerialT m b) -> Array a -> m (Array b)
@@ -504,7 +504,7 @@ streamTransform f arr =
504504-- otherwise accessing the last element of the array may result into a crash or
505505-- a random value.
506506--
507−-- /Internal/
507+-- /Pre-release/
508508--
509509unsafeCast ::
510510#ifdef DEVBUILD
@@ -515,7 +515,7 @@ unsafeCast (Array start end) = Array (castForeignPtr start) (castPtr end)
515515
516516-- | Cast an array into a Word8 array
517517--
518−-- /Internal/
518+-- /Pre-release/
519519--
520520asByteArray :: Array a -> Array Word8
521521asByteArray = unsafeCast
@@ -524,7 +524,7 @@ asByteArray = unsafeCast
524524-- type @b@. The length of the array should be a multiple of the size of the
525525-- target element otherwise 'Nothing' is returned.
526526--
527−-- /Internal/
527+-- /Pre-release/
528528--
529529cast :: forall a b. (Storable b) => Array a -> Maybe (Array b)
530530cast arr =
@@ -538,7 +538,7 @@ cast arr =
538538--
539539-- /Unsafe/
540540--
541−-- /Internal/
541+-- /Pre-release/
542542--
543543asPtr :: Array a -> (Ptr b -> IO c) -> IO c
544544asPtr Array{..} act = do
@@ -550,7 +550,7 @@ asPtr Array{..} act = do
550550--
551551-- /O(n) Time: (creates a copy of the array)/
552552--
553−-- /Internal/
553+-- /Pre-release/
554554--
555555asCString :: Array a -> (CString -> IO b) -> IO b
556556asCString arr act = do
@@ -563,14 +563,14 @@ asCString arr act = do
563563
564564-- | Fold an array using a 'Fold'.
565565--
566−-- /Internal/
566+-- /Pre-release/
567567{-# INLINE fold #-}
568568fold :: forall m a b. (MonadIO m, Storable a) => Fold m a b -> Array a -> m b
569569fold f arr = P.foldOnce f (A.toStream arr :: Serial.SerialT m a)
570570
571571-- | Fold an array using a stream fold operation.
572572--
573−-- /Internal/
573+-- /Pre-release/
574574{-# INLINE streamFold #-}
575575streamFold :: (MonadIO m, Storable a) => (SerialT m a -> m b) -> Array a -> m b
576576streamFold f arr = f (A.toStream arr)
src/Streamly/Internal/Data/Array/Foreign/Mut/Types.hs+5−5
@@ -423,7 +423,7 @@ length arr = byteLength arr `div` sizeOf (undefined :: a)
423423-- | Get the total capacity of an array. An array may have space reserved
424424-- beyond the current used length of the array.
425425--
426−-- /Internal/
426+-- /Pre-release/
427427{-# INLINE byteCapacity #-}
428428byteCapacity :: Array a -> Int
429429byteCapacity Array{..} =
@@ -446,7 +446,7 @@ data GroupState s start end bound
446446--
447447-- @arraysOf n = StreamD.foldMany (Array.writeN n)@
448448--
449−-- /Internal/
449+-- /Pre-release/
450450{-# INLINE_NORMAL arraysOf #-}
451451arraysOf :: forall m a. (MonadIO m, Storable a)
452452 => Int -> D.Stream m a -> D.Stream m (Array a)
@@ -538,7 +538,7 @@ read = Producer.simplify producer
538538
539539-- | Unfold an array into a stream in reverse order.
540540--
541−-- /Internal/
541+-- /Pre-release/
542542{-# INLINE_NORMAL readRev #-}
543543readRev :: forall m a. (Monad m, Storable a) => Unfold m (Array a) a
544544readRev = Unfold step inject
@@ -799,7 +799,7 @@ writeN = writeNAllocWith newArray
799799-- | @writeNAligned alignment n@ folds a maximum of @n@ elements from the input
800800-- stream to an 'Array' aligned to the given size.
801801--
802−-- /Internal/
802+-- /Pre-release/
803803--
804804{-# INLINE_NORMAL writeNAligned #-}
805805writeNAligned :: forall m a. (MonadIO m, Storable a)
@@ -811,7 +811,7 @@ writeNAligned alignSize = writeNAllocWith (newArrayAligned alignSize)
811811-- This could be useful to allocate memory that we need to allocate only once
812812-- in the lifetime of the program.
813813--
814−-- /Internal/
814+-- /Pre-release/
815815--
816816{-# INLINE_NORMAL writeNAlignedUnmanaged #-}
817817writeNAlignedUnmanaged :: forall m a. (MonadIO m, Storable a)
src/Streamly/Internal/Data/Array/Foreign/Types.hs+8−8
@@ -202,7 +202,7 @@ spliceTwo arr1 arr2 =
202202--
203203-- /Unsafe/
204204--
205−-- /Internal/
205+-- /Pre-release/
206206--
207207{-# INLINE fromPtr #-}
208208fromPtr ::
@@ -249,7 +249,7 @@ fromPtr n ptr = MA.unsafeInlineIO $ do
249249--
250250-- /Time complexity: O(1)/
251251--
252−-- /Internal/
252+-- /Pre-release/
253253--
254254{-# INLINE fromAddr# #-}
255255fromAddr# ::
@@ -281,7 +281,7 @@ fromAddr# n addr# = fromPtr n (castPtr $ Ptr addr#)
281281--
282282-- /Time complexity: O(n) (computes the length of the string)/
283283--
284−-- /Internal/
284+-- /Pre-release/
285285--
286286{-# INLINE fromCString# #-}
287287fromCString# :: Addr# -> Array Word8
@@ -395,7 +395,7 @@ length arr = MA.length (unsafeThaw arr)
395395
396396-- | Unfold an array into a stream in reverse order.
397397--
398−-- /Internal/
398+-- /Pre-release/
399399{-# INLINE_NORMAL readRev #-}
400400readRev :: forall m a. (Monad m, Storable a) => Unfold m (Array a) a
401401readRev = Unfold.lmap unsafeThaw MA.readRev
@@ -418,7 +418,7 @@ toStreamKRev arr = MA.toStreamKRev (unsafeThaw arr)
418418
419419-- | Convert an 'Array' into a stream.
420420--
421−-- /Internal/
421+-- /Pre-release/
422422{-# INLINE_EARLY toStream #-}
423423toStream :: (Monad m, K.IsStream t, Storable a) => Array a -> t m a
424424toStream = D.fromStreamD . toStreamD
@@ -428,7 +428,7 @@ toStream = D.fromStreamD . toStreamD
428428
429429-- | Convert an 'Array' into a stream in reverse order.
430430--
431−-- /Internal/
431+-- /Pre-release/
432432{-# INLINE_EARLY toStreamRev #-}
433433toStreamRev :: (Monad m, K.IsStream t, Storable a) => Array a -> t m a
434434toStreamRev = D.fromStreamD . toStreamDRev
@@ -476,7 +476,7 @@ writeN = fmap unsafeFreeze . MA.writeN
476476-- | @writeNAligned alignment n@ folds a maximum of @n@ elements from the input
477477-- stream to an 'Array' aligned to the given size.
478478--
479−-- /Internal/
479+-- /Pre-release/
480480--
481481{-# INLINE_NORMAL writeNAligned #-}
482482writeNAligned :: forall m a. (MonadIO m, Storable a)
@@ -488,7 +488,7 @@ writeNAligned alignSize = fmap unsafeFreeze . MA.writeNAligned alignSize
488488-- This could be useful to allocate memory that we need to allocate only once
489489-- in the lifetime of the program.
490490--
491−-- /Internal/
491+-- /Pre-release/
492492--
493493{-# INLINE_NORMAL writeNAlignedUnmanaged #-}
494494writeNAlignedUnmanaged :: forall m a. (MonadIO m, Storable a)
src/Streamly/Internal/Data/Array/Prim/MutTypesInclude.hs+4−4
@@ -134,7 +134,7 @@ shrinkArray (Array arr#) (I# n#) =
134134--
135135-- /Caution! Do not use this on infinite streams./
136136--
137−-- /Internal/
137+-- /Pre-release/
138138{-# INLINE_NORMAL write #-}
139139write :: (MonadIO m, Prim a) => Fold m a (Array a)
140140write = FL.mkAccumM step initial extract
@@ -160,7 +160,7 @@ write = FL.mkAccumM step initial extract
160160-- | @writeN n@ folds a maximum of @n@ elements from the input stream to an
161161-- 'Array'.
162162--
163−-- /Internal/
163+-- /Pre-release/
164164{-# INLINE_NORMAL writeN #-}
165165writeN :: (MonadIO m, Prim a) => Int -> Fold m a (Array a)
166166writeN limit = Fold step initial extract
@@ -190,7 +190,7 @@ data ArrayUnsafe a = ArrayUnsafe
190190-- conditional in the step function blocks fusion causing 10x performance
191191-- slowdown.
192192--
193−-- /Internal/
193+-- /Pre-release/
194194{-# INLINE_NORMAL writeNUnsafe #-}
195195writeNUnsafe :: (MonadIO m, Prim a) => Int -> Fold m a (Array a)
196196writeNUnsafe n = FL.mkAccumM step initial extract
@@ -303,7 +303,7 @@ data SpliceState s arr
303303-- arrays if the size would exceed the specified size we do not coalesce
304304-- therefore the actual array size may be less than the specified chunk size.
305305--
306−-- /Internal/
306+-- /Pre-release/
307307{-# INLINE_NORMAL packArraysChunksOf #-}
308308packArraysChunksOf ::
309309 (MonadIO m, Prim a)
src/Streamly/Internal/Data/Array/Prim/TypesInclude.hs+6−6
@@ -159,7 +159,7 @@ nil =
159159--
160160-- /Caution! Do not use this on infinite streams./
161161--
162−-- /Internal/
162+-- /Pre-release/
163163{-# INLINE_NORMAL write #-}
164164write :: (MonadIO m, Prim a) => Fold m a (Array a)
165165write = FL.rmapM unsafeFreeze MA.write
@@ -167,7 +167,7 @@ write = FL.rmapM unsafeFreeze MA.write
167167-- | @writeN n@ folds a maximum of @n@ elements from the input stream to an
168168-- 'Array'.
169169--
170−-- /Internal/
170+-- /Pre-release/
171171{-# INLINE_NORMAL writeN #-}
172172writeN :: (MonadIO m, Prim a) => Int -> Fold m a (Array a)
173173writeN limit = FL.rmapM unsafeFreeze (MA.writeN limit)
@@ -178,7 +178,7 @@ writeN limit = FL.rmapM unsafeFreeze (MA.writeN limit)
178178-- conditional in the step function blocks fusion causing 10x performance
179179-- slowdown.
180180--
181−-- /Internal/
181+-- /Pre-release/
182182{-# INLINE_NORMAL writeNUnsafe #-}
183183writeNUnsafe :: (MonadIO m, Prim a) => Int -> Fold m a (Array a)
184184writeNUnsafe limit = FL.rmapM unsafeFreeze (MA.writeNUnsafe limit)
@@ -239,7 +239,7 @@ toListFB c n arr = go 0
239239
240240-- | Convert an 'Array' into a list.
241241--
242−-- /Internal/
242+-- /Pre-release/
243243{-# INLINE toList #-}
244244toList :: Prim a => Array a -> [a]
245245toList s = build (\c n -> toListFB c n s)
@@ -534,7 +534,7 @@ data SpliceState s arr1 arr2
534534-- arrays if the size would exceed the specified size we do not coalesce
535535-- therefore the actual array size may be less than the specified chunk size.
536536--
537−-- /Internal/
537+-- /Pre-release/
538538{-# INLINE_NORMAL packArraysChunksOf #-}
539539packArraysChunksOf ::
540540 forall m a. (MonadIO m, Prim a)
@@ -655,7 +655,7 @@ data SplitState s arr
655655-- | Split a stream of arrays on a given separator byte, dropping the separator
656656-- and coalescing all the arrays between two separators into a single array.
657657--
658−-- /Internal/
658+-- /Pre-release/
659659{-# INLINE_NORMAL splitOn #-}
660660splitOn ::
661661 MonadIO m
src/Streamly/Internal/Data/Array/PrimInclude.hs+12−12
@@ -27,7 +27,7 @@ import Prelude hiding (length, null, last, map, (!!), read, concat)
2727-- allocated to size N, if the stream terminates before N elements then the
2828-- array may hold less than N elements.
2929--
30−-- /Internal/
30+-- /Pre-release/
3131{-# INLINE fromStreamN #-}
3232fromStreamN :: (MonadIO m, Prim a) => Int -> SerialT m a -> m (Array a)
3333fromStreamN n m = do
@@ -42,7 +42,7 @@ fromStreamN n m = do
4242-- may fail. When the stream size is not known, `arraysOf` followed by
4343-- processing of indvidual arrays in the resulting stream should be preferred.
4444--
45−-- /Internal/
45+-- /Pre-release/
4646{-# INLINE fromStream #-}
4747fromStream :: (MonadIO m, Prim a) => SerialT m a -> m (Array a)
4848fromStream = P.foldOnce A.write
@@ -54,7 +54,7 @@ fromStream = P.foldOnce A.write
5454
5555-- | Convert an 'Array' into a stream.
5656--
57−-- /Internal/
57+-- /Pre-release/
5858{-# INLINE_EARLY toStream #-}
5959toStream :: (MonadIO m, K.IsStream t, Prim a) => Array a -> t m a
6060toStream = D.fromStreamD . A.toStreamD
@@ -64,7 +64,7 @@ toStream = D.fromStreamD . A.toStreamD
6464
6565-- | Convert an 'Array' into a stream in reverse order.
6666--
67−-- /Internal/
67+-- /Pre-release/
6868{-# INLINE_EARLY toStreamRev #-}
6969toStreamRev :: (MonadIO m, IsStream t, Prim a) => Array a -> t m a
7070toStreamRev = D.fromStreamD . A.toStreamDRev
@@ -98,7 +98,7 @@ read = Unfold step inject
9898-- for which this was written, "read" proves to be faster even though the core
9999-- generated with unsafeRead looks simpler.
100100--
101−-- /Internal/
101+-- /Pre-release/
102102--
103103{-# INLINE_NORMAL unsafeRead #-}
104104unsafeRead :: (MonadIO m, Prim a) => Unfold m (Array a) a
@@ -114,7 +114,7 @@ unsafeRead = Unfold step inject
114114
115115-- | > null arr = length arr == 0
116116--
117−-- /Internal/
117+-- /Pre-release/
118118{-# INLINE null #-}
119119null :: Array a -> Bool
120120null arr = length arr == 0
@@ -125,14 +125,14 @@ null arr = length arr == 0
125125
126126-- | Fold an array using a 'Fold'.
127127--
128−-- /Internal/
128+-- /Pre-release/
129129{-# INLINE fold #-}
130130fold :: forall m a b. (MonadIO m, Prim a) => Fold m a b -> Array a -> m b
131131fold f arr = P.foldOnce f (toStream arr :: Serial.SerialT m a)
132132
133133-- | Fold an array using a stream fold operation.
134134--
135−-- /Internal/
135+-- /Pre-release/
136136{-# INLINE streamFold #-}
137137streamFold :: (MonadIO m, Prim a) => (SerialT m a -> m b) -> Array a -> m b
138138streamFold f arr = f (toStream arr)
@@ -143,7 +143,7 @@ streamFold f arr = f (toStream arr)
143143
144144-- | /O(1)/ Lookup the element at the given index, starting from 0.
145145--
146−-- /Internal/
146+-- /Pre-release/
147147{-# INLINE readIndex #-}
148148readIndex :: Prim a => Array a -> Int -> Maybe a
149149readIndex arr i =
@@ -153,7 +153,7 @@ readIndex arr i =
153153
154154-- | > last arr = readIndex arr (length arr - 1)
155155--
156−-- /Internal/
156+-- /Pre-release/
157157{-# INLINE last #-}
158158last :: Prim a => Array a -> Maybe a
159159last arr = readIndex arr (length arr - 1)
@@ -168,7 +168,7 @@ last arr = readIndex arr (length arr - 1)
168168--
169169-- > concat = S.concatMap A.read
170170--
171−-- /Internal/
171+-- /Pre-release/
172172{-# INLINE concat #-}
173173concat :: (IsStream t, MonadIO m, Prim a) => t m (Array a) -> t m a
174174-- concat m = D.fromStreamD $ A.flattenArrays (D.toStreamD m)
@@ -178,7 +178,7 @@ concat m = D.fromStreamD $ D.concatUnfold read (D.toStreamD m)
178178-- | Coalesce adjacent arrays in incoming stream to form bigger arrays of a
179179-- maximum specified size in bytes.
180180--
181−-- /Internal/
181+-- /Pre-release/
182182{-# INLINE compact #-}
183183compact ::
184184 (MonadIO m, Prim a) => Int -> SerialT m (Array a) -> SerialT m (Array a)
src/Streamly/Internal/Data/Array/Stream/Foreign.hs+2−2
@@ -75,7 +75,7 @@ import qualified Streamly.Internal.Data.Stream.StreamD as D
7575--
7676-- > arraysOf n = Stream.chunksOf n (Array.writeN n)
7777--
78−-- /Internal/
78+-- /Pre-release/
7979{-# INLINE arraysOf #-}
8080arraysOf :: (IsStream t, MonadIO m, Storable a)
8181 => Int -> t m a -> t m (Array a)
@@ -119,7 +119,7 @@ concatRev m = D.fromStreamD $ A.flattenArraysRev (D.toStreamD m)
119119-- | Flatten a stream of arrays after inserting the given element between
120120-- arrays.
121121--
122−-- /Internal/
122+-- /Pre-release/
123123{-# INLINE interpose #-}
124124interpose :: (MonadIO m, IsStream t, Storable a) => a -> t m (Array a) -> t m a
125125interpose x = S.interpose x A.read
src/Streamly/Internal/Data/Array/Stream/Mut/Foreign.hs+1−1
@@ -59,7 +59,7 @@ import Prelude hiding (length)
5959--
6060-- > arraysOf n = Stream.foldMany (MArray.writeN n)
6161--
62−-- /Internal/
62+-- /Pre-release/
6363{-# INLINE arraysOf #-}
6464arraysOf :: (IsStream t, MonadIO m, Storable a)
6565 => Int -> t m a -> t m (Array a)
src/Streamly/Internal/Data/Binary/Decode.hs+12−12
@@ -43,7 +43,7 @@ import qualified Streamly.Internal.Data.Parser.ParserK.Types as PRK
4343-- 0 ==> ()
4444-- @
4545--
46−-- /Internal/
46+-- /Pre-release/
4747--
4848{-# INLINE unit #-}
4949unit :: MonadCatch m => Parser m Word8 ()
@@ -62,7 +62,7 @@ word8ToBool w = Left ("Invalid Bool encoding " ++ Prelude.show w)
6262-- 1 ==> True
6363-- @
6464--
65−-- /Internal/
65+-- /Pre-release/
6666--
6767{-# INLINE bool #-}
6868bool :: MonadCatch m => Parser m Word8 Bool
@@ -83,7 +83,7 @@ word8ToOrdering w = Left ("Invalid Ordering encoding " ++ Prelude.show w)
8383-- 2 ==> GT
8484-- @
8585--
86−-- /Internal/
86+-- /Pre-release/
8787--
8888{-# INLINE ordering #-}
8989ordering :: MonadCatch m => Parser m Word8 Ordering
@@ -92,7 +92,7 @@ ordering = PR.either word8ToOrdering
9292-- XXX should go in a Word8 parser module?
9393-- | Accept the input byte only if it is equal to the specified value.
9494--
95−-- /Internal/
95+-- /Pre-release/
9696--
9797{-# INLINE eqWord8 #-}
9898eqWord8 :: MonadCatch m => Word8 -> Parser m Word8 Word8
@@ -100,7 +100,7 @@ eqWord8 b = PR.satisfy (== b)
100100
101101-- | Accept any byte.
102102--
103−-- /Internal/
103+-- /Pre-release/
104104--
105105{-# INLINE word8 #-}
106106word8 :: MonadCatch m => Parser m Word8 Word8
@@ -127,7 +127,7 @@ word16beD = PRD.Parser step initial extract
127127-- | Parse two bytes as a 'Word16', the first byte is the MSB of the Word16 and
128128-- second byte is the LSB (big endian representation).
129129--
130−-- /Internal/
130+-- /Pre-release/
131131--
132132{-# INLINE word16be #-}
133133word16be :: MonadCatch m => Parser m Word8 Word16
@@ -152,7 +152,7 @@ word16leD = PRD.Parser step initial extract
152152-- | Parse two bytes as a 'Word16', the first byte is the LSB of the Word16 and
153153-- second byte is the MSB (little endian representation).
154154--
155−-- /Internal/
155+-- /Pre-release/
156156--
157157{-# INLINE word16le #-}
158158word16le :: MonadCatch m => Parser m Word8 Word16
@@ -179,7 +179,7 @@ word32beD = PRD.Parser step initial extract
179179-- | Parse four bytes as a 'Word32', the first byte is the MSB of the Word32
180180-- and last byte is the LSB (big endian representation).
181181--
182−-- /Internal/
182+-- /Pre-release/
183183--
184184{-# INLINE word32be #-}
185185word32be :: MonadCatch m => Parser m Word8 Word32
@@ -205,7 +205,7 @@ word32leD = PRD.Parser step initial extract
205205-- | Parse four bytes as a 'Word32', the first byte is the MSB of the Word32
206206-- and last byte is the LSB (big endian representation).
207207--
208−-- /Internal/
208+-- /Pre-release/
209209--
210210{-# INLINE word32le #-}
211211word32le :: MonadCatch m => Parser m Word8 Word32
@@ -232,7 +232,7 @@ word64beD = PRD.Parser step initial extract
232232-- | Parse eight bytes as a 'Word64', the first byte is the MSB of the Word64
233233-- and last byte is the LSB (big endian representation).
234234--
235−-- /Internal/
235+-- /Pre-release/
236236--
237237{-# INLINE word64be #-}
238238word64be :: MonadCatch m => Parser m Word8 Word64
@@ -258,7 +258,7 @@ word64leD = PRD.Parser step initial extract
258258-- | Parse eight bytes as a 'Word64', the first byte is the MSB of the Word64
259259-- and last byte is the LSB (big endian representation).
260260--
261−-- /Internal/
261+-- /Pre-release/
262262--
263263{-# INLINE word64le #-}
264264word64le :: MonadCatch m => Parser m Word8 Word64
@@ -270,7 +270,7 @@ word64le = PRK.toParserK word64leD
270270
271271-- | Parse eight bytes as a 'Word64' in the host byte order.
272272--
273−-- /Internal/
273+-- /Pre-release/
274274--
275275{-# INLINE word64host #-}
276276word64host :: (MonadIO m, MonadCatch m) => Parser m Word8 Word64
src/Streamly/Internal/Data/Cont.hs+1−1
@@ -19,7 +19,7 @@ import Control.Monad.Cont (runCont, cont)
1919-- continuation based transformation from @[b]@ to @c@, make continuation based
2020-- transformation from @[a]@ to @c@.
2121--
22−-- /Internal/
22+-- /Pre-release/
2323
2424-- You can read the definition as:
2525--
src/Streamly/Internal/Data/Fold.hs+13−13
@@ -269,7 +269,7 @@ import Streamly.Internal.Data.Fold.Types
269269
270270-- | Change the underlying monad of a fold
271271--
272−-- /Internal/
272+-- /Pre-release/
273273hoist :: (forall x. m x -> n x) -> Fold m a b -> Fold n a b
274274hoist f (Fold step initial extract) =
275275 Fold (\x a -> f $ step x a) (f initial) (f . extract)
@@ -278,7 +278,7 @@ hoist f (Fold step initial extract) =
278278--
279279-- > generally = hoist (return . runIdentity)
280280--
281−-- /Internal/
281+-- /Pre-release/
282282generally :: Monad m => Fold Identity a b -> Fold m a b
283283generally = hoist (return . runIdentity)
284284
@@ -338,7 +338,7 @@ mapM = rmapM
338338-- >>> Stream.fold fld (Stream.enumerateFromTo 1 10)
339339-- [2,4,6,8,10]
340340--
341−-- /Internal/
341+-- /Pre-release/
342342{-# INLINE mapMaybe #-}
343343mapMaybe :: (Monad m) => (a -> Maybe b) -> Fold m b r -> Fold m a r
344344mapMaybe f = map f . filter isJust . map fromJust
@@ -656,7 +656,7 @@ rollingHashFirstN n = takeLE n rollingHash
656656--
657657-- > S.fold (FL.sconcat 10) (S.map Sum $ S.enumerateFromTo 1 10)
658658--
659−-- /Internal/
659+-- /Pre-release/
660660--
661661{-# INLINE sconcat #-}
662662sconcat :: (Monad m, Semigroup a) => a -> Fold m a a
@@ -973,7 +973,7 @@ or = any (== True)
973973--
974974-- > splitAt n f1 f2 = splitWith (,) (takeLE n f1) f2
975975--
976−-- /Internal/
976+-- /Pre-release/
977977
978978{-# INLINE splitAt #-}
979979splitAt
@@ -1041,7 +1041,7 @@ splitAt n fld = splitWith (,) (takeLE n fld)
10411041--
10421042-- Stops - when the predicate succeeds.
10431043--
1044−-- /Internal/
1044+-- /Pre-release/
10451045{-# INLINE sliceSepBy #-}
10461046sliceSepBy :: Monad m => (a -> Bool) -> Fold m a b -> Fold m a b
10471047sliceSepBy predicate (Fold fstep finitial fextract) =
@@ -1062,7 +1062,7 @@ sliceSepBy predicate (Fold fstep finitial fextract) =
10621062--
10631063-- > Stream.splitWithSuffix pred f = Stream.foldMany (Fold.sliceEndWith pred f)
10641064--
1065−-- /Internal/
1065+-- /Pre-release/
10661066--
10671067{-# INLINE sliceEndWith #-}
10681068sliceEndWith :: Monad m => (a -> Bool) -> Fold m a b -> Fold m a b
@@ -1355,7 +1355,7 @@ partition = partitionBy id
13551355--
13561356-- > demuxWith f kv = fmap fst $ demuxDefaultWith f kv drain
13571357--
1358−-- /Internal/
1358+-- /Pre-release/
13591359--
13601360{-# INLINE demuxWith #-}
13611361demuxWith :: (Monad m, Ord k)
@@ -1394,7 +1394,7 @@ data DemuxState s b doneMap runMap =
13941394--
13951395-- Stops when all the folds, including the catchall fold, stop.
13961396--
1397−-- /Internal/
1397+-- /Pre-release/
13981398--
13991399{-# INLINE demuxDefaultWith #-}
14001400demuxDefaultWith :: (Monad m, Ord k)
@@ -1528,7 +1528,7 @@ demuxDefault = demuxDefaultWith id
15281528--
15291529-- /Stops: never/
15301530--
1531−-- /Internal/
1531+-- /Pre-release/
15321532--
15331533{-# INLINE classifyWith #-}
15341534classifyWith :: (Monad m, Ord k) => (a -> k) -> Fold m a b -> Fold m a (Map k b)
@@ -1746,7 +1746,7 @@ indexed = zip (Stream.enumerateFrom 0 :: SerialT m Int)
17461746-- filterWithRelTime = with timeIndexed filter
17471747-- @
17481748--
1749−-- /Internal/
1749+-- /Pre-release/
17501750{-# INLINE with #-}
17511751with ::
17521752 (Fold m (s, a) b -> Fold m a b)
@@ -1800,7 +1800,7 @@ chunksBetween _low _high _f1 _f2 = undefined
18001800-- /Warning!/ working on large streams accumulated as buffers in memory could
18011801-- be very inefficient, consider using "Streamly.Data.Array" instead.
18021802--
1803−-- /Internal/
1803+-- /Pre-release/
18041804{-# INLINE toStream #-}
18051805toStream :: Monad m => Fold m a (SerialT Identity a)
18061806toStream = mkAccum (\f x -> f . (x `K.cons`)) id ($ K.nil)
@@ -1814,7 +1814,7 @@ toStream = mkAccum (\f x -> f . (x `K.cons`)) id ($ K.nil)
18141814-- /Warning!/ working on large streams accumulated as buffers in memory could
18151815-- be very inefficient, consider using "Streamly.Data.Array" instead.
18161816--
1817−-- /Internal/
1817+-- /Pre-release/
18181818
18191819-- xn : ... : x2 : x1 : []
18201820{-# INLINABLE toStreamRev #-}
src/Streamly/Internal/Data/Fold/Tee.hs+1−1
@@ -28,7 +28,7 @@ import qualified Streamly.Internal.Data.Fold.Types as Fold
2828-- @Tee@ is a wrapper over 'Fold' that uses 'teeWith' to define the applicative
2929-- instance.
3030--
31−-- /Internal/
31+-- /Pre-release/
3232newtype Tee m a b =
3333 Tee { runTee :: Fold m a b }
3434 deriving (Functor)
src/Streamly/Internal/Data/Fold/Types.hs+19−18
@@ -259,7 +259,7 @@ import Prelude hiding (concatMap, filter, map)
259259-- state or the driver can use @extract@ on the state to get the result out.
260260-- 'Done' returns the final result and the fold cannot be driven further.
261261--
262−-- /Internal/
262+-- /Pre-release/
263263--
264264{-# ANN type Step Fuse #-}
265265data Step s b
@@ -269,7 +269,7 @@ data Step s b
269269-- | A bifunctor instance on 'Step'. @first@ maps on the value held by 'Partial'
270270-- and @second@ maps on the result held by 'Done'.
271271--
272−-- /Internal/
272+-- /Pre-release/
273273--
274274instance Bifunctor Step where
275275 {-# INLINE bimap #-}
@@ -289,7 +289,7 @@ instance Bifunctor Step where
289289-- fmap = 'second'
290290-- @
291291--
292−-- /Internal/
292+-- /Pre-release/
293293--
294294instance Functor (Step s) where
295295 {-# INLINE fmap #-}
@@ -326,7 +326,7 @@ data Fold m a b =
326326-- If your 'Fold' returns only 'Partial' (i.e. never returns a 'Done') then you
327327-- can use @mkAccum*@ constructors.
328328--
329−-- /Internal/
329+-- /Pre-release/
330330--
331331{-# INLINE mkAccum #-}
332332mkAccum :: Monad m => (s -> a -> s) -> s -> (s -> b) -> Fold m a b
@@ -343,7 +343,7 @@ mkAccum step initial extract =
343343-- mkAccum_ step initial = mkAccum step initial id
344344-- @
345345--
346−-- /Internal/
346+-- /Pre-release/
347347--
348348{-# INLINE mkAccum_ #-}
349349mkAccum_ :: Monad m => (b -> a -> b) -> b -> Fold m a b
@@ -352,7 +352,7 @@ mkAccum_ step initial = mkAccum step initial id
352352-- | Make an accumulating (non-terminating) fold with an effectful step
353353-- function, an initial state, and a state extraction function.
354354--
355−-- /Internal/
355+-- /Pre-release/
356356--
357357{-# INLINE mkAccumM #-}
358358mkAccumM :: Functor m => (s -> a -> m s) -> m s -> (s -> m b) -> Fold m a b
@@ -366,7 +366,7 @@ mkAccumM step initial =
366366-- mkAccumM_ step initial = mkAccumM step initial return
367367-- @
368368--
369−-- /Internal/
369+-- /Pre-release/
370370--
371371{-# INLINE mkAccumM_ #-}
372372mkAccumM_ :: Monad m => (b -> a -> m b) -> m b -> Fold m a b
@@ -375,7 +375,7 @@ mkAccumM_ step initial = mkAccumM step initial return
375375-- | Make a terminating fold using a pure step function, a pure initial state
376376-- and a pure state extraction function.
377377--
378−-- /Internal/
378+-- /Pre-release/
379379--
380380{-# INLINE mkFold #-}
381381mkFold :: Monad m => (s -> a -> Step s b) -> Step s b -> (s -> b) -> Fold m a b
@@ -389,7 +389,7 @@ mkFold step initial extract =
389389-- mkFold_ step initial = mkFold step initial id
390390-- @
391391--
392−-- /Internal/
392+-- /Pre-release/
393393--
394394{-# INLINE mkFold_ #-}
395395mkFold_ :: Monad m => (b -> a -> Step b b) -> Step b b -> Fold m a b
@@ -402,7 +402,7 @@ mkFold_ step initial = mkFold step initial id
402402--
403403-- We can just use 'Fold' but it is provided for completeness.
404404--
405−-- /Internal/
405+-- /Pre-release/
406406--
407407{-# INLINE mkFoldM #-}
408408mkFoldM :: (s -> a -> m (Step s b)) -> m (Step s b) -> (s -> m b) -> Fold m a b
@@ -415,7 +415,7 @@ mkFoldM = Fold
415415-- mkFoldM_ step initial = mkFoldM step initial return
416416-- @
417417--
418−-- /Internal/
418+-- /Pre-release/
419419--
420420{-# INLINE mkFoldM_ #-}
421421mkFoldM_ :: Monad m => (b -> a -> m (Step b b)) -> m (Step b b) -> Fold m a b
@@ -515,7 +515,7 @@ data SeqFoldState sl f sr = SeqFoldL !sl | SeqFoldR !f !sr
515515-- 'Streamly.Prelude.serial', it splits the streams using two folds and zips
516516-- the results. This has the same caveats as ParseD's @splitWith@
517517--
518−-- /Internal/
518+-- /Pre-release/
519519--
520520{-# INLINE splitWith #-}
521521splitWith :: Monad m => (a -> b -> c) -> Fold m x a -> Fold m x b -> Fold m x c
@@ -576,6 +576,7 @@ data GenericRunner sL sR bL bR
576576-- of them terminate and combines their output using @k@.
577577--
578578-- @since 0.8.0
579+--
579580{-# INLINE teeWith #-}
580581teeWith :: Monad m => (a -> b -> c) -> Fold m x a -> Fold m x b -> Fold m x c
581582teeWith f (Fold stepL beginL doneL) (Fold stepR beginR doneR) =
@@ -684,7 +685,7 @@ data ConcatMapState m sa a c
684685-- >>> Stream.fold (Fold.concatMap (flip Fold.takeLE Fold.sum) (Fold.rmapM (return . fromJust) Fold.head)) $ Stream.fromList [10,9..1]
685686-- 45
686687--
687−-- /Internal/
688+-- /Pre-release/
688689--
689690{-# INLINE concatMap #-}
690691concatMap :: Monad m => (b -> Fold m a c) -> Fold m a b -> Fold m a c
@@ -801,7 +802,7 @@ lcatMaybes = filter isJust . map fromJust
801802-- >>> Stream.fold (Fold.takeLE (-1) Fold.toList) $ Stream.fromList [1]
802803-- []
803804--
804−-- /Internal/
805+-- /Pre-release/
805806--
806807-- @since 0.7.0
807808{-# INLINE takeLE #-}
@@ -897,7 +898,7 @@ runStep (Fold step initial extract) a = return $ Fold step initial1 extract
897898--
898899-- Stops when @collect@ stops.
899900--
900−-- /Internal/
901+-- /Pre-release/
901902--
902903-- /See also: Streamly.Prelude.concatMap, Streamly.Prelude.foldMany/
903904--
@@ -957,7 +958,7 @@ many (Fold cstep cinitial cextract) (Fold sstep sinitial sextract) =
957958--
958959-- Stops when @collect@ stops.
959960--
960−-- /Internal/
961+-- /Pre-release/
961962--
962963{-# INLINE chunksOf #-}
963964chunksOf :: Monad m => Int -> Fold m a b -> Fold m b c -> Fold m a c
@@ -994,7 +995,7 @@ chunksOf2 n (Fold step1 initial1 extract1) (Fold2 step2 inject2 extract2) =
994995--
995996-- Stops when @fold@ stops or when the timeout occurs.
996997--
997−-- /Internal/
998+-- /Pre-release/
998999--
9991000{-# INLINE takeByTime #-}
10001001takeByTime :: MonadAsync m => Double -> Fold m a b -> Fold m a b
@@ -1058,7 +1059,7 @@ takeByTime n (Fold step initial done) = Fold step' initial' done'
10581059--
10591060-- > intervalsOf n split collect = many collect (takeByTime n split)
10601061--
1061−-- /Internal/
1062+-- /Pre-release/
10621063--
10631064{-# INLINE intervalsOf #-}
10641065intervalsOf :: MonadAsync m => Double -> Fold m a b -> Fold m b c -> Fold m a c
src/Streamly/Internal/Data/IOFinalizer.hs+4−4
@@ -34,7 +34,7 @@ import Streamly.Internal.Data.SVar (captureMonadState, runInIO)
3434--
3535-- It is implemented using 'mkWeakIORef'.
3636--
37−-- /Internal/
37+-- /Pre-release/
3838newtype IOFinalizer = IOFinalizer (IORef (Maybe (IO ())))
3939
4040-- | Make a finalizer from a monadic action @m a@ that can run in IO monad.
@@ -65,7 +65,7 @@ runFinalizerGC ref = do
6565-- finalizer is run manually before GC we could run it with the current state
6666-- of the monad but we want to keep both the cases consistent.
6767--
68−-- /Internal/
68+-- /Pre-release/
6969newIOFinalizer :: (MonadIO m, MonadBaseControl IO m) => m a -> m IOFinalizer
7070newIOFinalizer finalizer = do
7171 f <- mkIOFinalizer finalizer
@@ -77,7 +77,7 @@ newIOFinalizer finalizer = do
7777-- never runs again. Note, the finalizing action runs with async exceptions
7878-- masked.
7979--
80−-- /Internal/
80+-- /Pre-release/
8181runIOFinalizer :: MonadIO m => IOFinalizer -> m ()
8282runIOFinalizer (IOFinalizer ref) = liftIO $ do
8383 res <- readIORef ref
@@ -94,7 +94,7 @@ runIOFinalizer (IOFinalizer ref) = liftIO $ do
9494-- | Run an action clearing the finalizer atomically wrt async exceptions. The
9595-- action is run with async exceptions masked.
9696--
97−-- /Internal/
97+-- /Pre-release/
9898clearingIOFinalizer :: MonadBaseControl IO m => IOFinalizer -> m a -> m a
9999clearingIOFinalizer (IOFinalizer ref) action = do
100100 control $ \runinio ->
src/Streamly/Internal/Data/IORef/Prim.hs+6−6
@@ -56,7 +56,7 @@ data IORef a = IORef (MutableByteArray# RealWorld)
5656
5757-- | Create a new 'IORef'.
5858--
59−-- /Internal/
59+-- /Pre-release/
6060{-# INLINE newIORef #-}
6161newIORef :: forall a. Prim a => a -> IO (IORef a)
6262newIORef x = IO (\s# ->
@@ -68,21 +68,21 @@ newIORef x = IO (\s# ->
6868
6969-- | Write a value to an 'IORef'.
7070--
71−-- /Internal/
71+-- /Pre-release/
7272{-# INLINE writeIORef #-}
7373writeIORef :: Prim a => IORef a -> a -> IO ()
7474writeIORef (IORef arr#) x = primitive_ (writeByteArray# arr# 0# x)
7575
7676-- | Read a value from an 'IORef'.
7777--
78−-- /Internal/
78+-- /Pre-release/
7979{-# INLINE readIORef #-}
8080readIORef :: Prim a => IORef a -> IO a
8181readIORef (IORef arr#) = IO (readByteArray# arr# 0#)
8282
8383-- | Modify the value of an 'IORef' using a function with strict application.
8484--
85−-- /Internal/
85+-- /Pre-release/
8686{-# INLINE modifyIORef' #-}
8787modifyIORef' :: Prim a => IORef a -> (a -> a) -> IO ()
8888modifyIORef' (IORef arr#) g = primitive_ $ \s# ->
@@ -91,7 +91,7 @@ modifyIORef' (IORef arr#) g = primitive_ $ \s# ->
9191
9292-- | Generate a stream by continuously reading the IORef.
9393--
94−-- /Internal/
94+-- /Pre-release/
9595{-# INLINE_NORMAL toStreamD #-}
9696toStreamD :: (MonadIO m, Prim a) => IORef a -> D.Stream m a
9797toStreamD var = D.Stream step ()
@@ -103,7 +103,7 @@ toStreamD var = D.Stream step ()
103103
104104-- | Construct a stream by reading a 'Prim' 'IORef' repeatedly.
105105--
106−-- /Internal/
106+-- /Pre-release/
107107--
108108{-# INLINE toStream #-}
109109toStream :: (K.IsStream t, MonadIO m, Prim a) => IORef a -> t m a
src/Streamly/Internal/Data/Parser.hs+33−33
@@ -221,7 +221,7 @@ import qualified Streamly.Internal.Data.Parser.ParserK.Types as K
221221--
222222-- | Make a 'Parser' from a 'Fold'.
223223--
224−-- /Internal/
224+-- /Pre-release/
225225--
226226{-# INLINE fromFold #-}
227227fromFold :: MonadCatch m => Fold m a b -> Parser m a b
@@ -235,7 +235,7 @@ fromFold = K.toParserK . D.fromFold
235235--
236236-- | A parser that always yields a pure value without consuming any input.
237237--
238−-- /Internal/
238+-- /Pre-release/
239239--
240240{-# INLINE [3] yield #-}
241241yield :: MonadCatch m => b -> Parser m a b
@@ -248,7 +248,7 @@ yield = K.toParserK . D.yield
248248-- | A parser that always yields the result of an effectful action without
249249-- consuming any input.
250250--
251−-- /Internal/
251+-- /Pre-release/
252252--
253253{-# INLINE yieldM #-}
254254yieldM :: MonadCatch m => m b -> Parser m a b
@@ -259,7 +259,7 @@ yieldM = K.yieldM -- K.toParserK . D.yieldM
259259-- | A parser that always fails with an error message without consuming
260260-- any input.
261261--
262−-- /Internal/
262+-- /Pre-release/
263263--
264264{-# INLINE [3] die #-}
265265die :: MonadCatch m => String -> Parser m a b
@@ -272,7 +272,7 @@ die = K.toParserK . D.die
272272-- | A parser that always fails with an effectful error message and without
273273-- consuming any input.
274274--
275−-- /Internal/
275+-- /Pre-release/
276276--
277277{-# INLINE dieM #-}
278278dieM :: MonadCatch m => m String -> Parser m a b
@@ -292,7 +292,7 @@ dieM = K.toParserK . D.dieM
292292-- peek = lookAhead (satisfy True)
293293-- @
294294--
295−-- /Internal/
295+-- /Pre-release/
296296--
297297{-# INLINE peek #-}
298298peek :: MonadCatch m => Parser m a a
@@ -303,7 +303,7 @@ peek = K.toParserK D.peek
303303-- >>> Stream.parse ((,) <$> Parser.satisfy (> 0) <*> Parser.eof) $ Stream.fromList [1]
304304-- (1,())
305305--
306−-- /Internal/
306+-- /Pre-release/
307307--
308308{-# INLINE eof #-}
309309eof :: MonadCatch m => Parser m a ()
@@ -314,7 +314,7 @@ eof = K.toParserK D.eof
314314-- >>> Stream.parse (Parser.satisfy (== 1)) $ Stream.fromList [1,0,1]
315315-- 1
316316--
317−-- /Internal/
317+-- /Pre-release/
318318--
319319{-# INLINE satisfy #-}
320320satisfy :: MonadCatch m => (a -> Bool) -> Parser m a a
@@ -324,7 +324,7 @@ satisfy = K.toParserK . D.satisfy
324324-- parser fails if the function returns 'Nothing' otherwise returns the 'Just'
325325-- value.
326326--
327−-- /Internal/
327+-- /Pre-release/
328328--
329329{-# INLINE maybe #-}
330330maybe :: MonadCatch m => (a -> Maybe b) -> Parser m a b
@@ -334,7 +334,7 @@ maybe = K.toParserK . D.maybe
334334-- the function returns 'Left err', the parser fails with the error message
335335-- @err@ otherwise returns the 'Right' value.
336336--
337−-- /Internal/
337+-- /Pre-release/
338338--
339339{-# INLINE either #-}
340340either :: MonadCatch m => (a -> Either String b) -> Parser m a b
@@ -385,7 +385,7 @@ either = K.toParserK . D.either
385385-- takeGE = takeBetween n maxBound
386386-- @
387387--
388−-- /Internal/
388+-- /Pre-release/
389389--
390390{-# INLINE takeBetween #-}
391391takeBetween :: MonadCatch m =>
@@ -401,7 +401,7 @@ takeBetween m n = K.toParserK . D.takeBetween m n
401401-- >>> Stream.parse (Parser.takeEQ 4 Fold.toList) $ Stream.fromList [1,0,1]
402402-- *** Exception: ParseError "takeEQ: Expecting exactly 4 elements, input terminated on 3"
403403--
404−-- /Internal/
404+-- /Pre-release/
405405--
406406{-# INLINE takeEQ #-}
407407takeEQ :: MonadCatch m => Int -> Fold m a b -> Parser m a b
@@ -419,7 +419,7 @@ takeEQ n = K.toParserK . D.takeEQ n
419419-- >>> Stream.parse (Parser.takeGE 4 Fold.toList) $ Stream.fromList [1,0,1,0,1]
420420-- [1,0,1,0,1]
421421--
422−-- /Internal/
422+-- /Pre-release/
423423--
424424{-# INLINE takeGE #-}
425425takeGE :: MonadCatch m => Int -> Fold m a b -> Parser m a b
@@ -464,7 +464,7 @@ takeWhileP _cond = undefined -- K.toParserK . D.takeWhileP cond
464464-- breakOn p = takeWhile (not p)
465465-- @
466466--
467−-- /Internal/
467+-- /Pre-release/
468468--
469469{-# INLINE takeWhile #-}
470470takeWhile :: MonadCatch m => (a -> Bool) -> Fold m a b -> Parser m a b
@@ -472,7 +472,7 @@ takeWhile cond = K.toParserK . D.takeWhile cond
472472
473473-- | Like 'takeWhile' but takes at least one element otherwise fails.
474474--
475−-- /Internal/
475+-- /Pre-release/
476476--
477477{-# INLINE takeWhile1 #-}
478478takeWhile1 :: MonadCatch m => (a -> Bool) -> Fold m a b -> Parser m a b
@@ -483,7 +483,7 @@ takeWhile1 cond = K.toParserK . D.takeWhile1 cond
483483--
484484-- This is also called @skipWhile@ in some parsing libraries.
485485--
486−-- /Internal/
486+-- /Pre-release/
487487--
488488{-# INLINE drainWhile #-}
489489drainWhile :: MonadCatch m => (a -> Bool) -> Parser m a ()
@@ -500,7 +500,7 @@ drainWhile p = takeWhile p FL.drain
500500-- sliceSepByBetween cond m n p = sliceSepByP cond (takeBetween m n p)
501501-- @
502502--
503−-- /Internal/
503+-- /Pre-release/
504504--
505505{-# INLINABLE sliceSepByP #-}
506506sliceSepByP ::
@@ -549,7 +549,7 @@ sliceSepWith _cond = undefined -- K.toParserK . D.sliceSepBy cond
549549-- >>> sliceBeginWithOdd []
550550-- []
551551--
552−-- /Internal/
552+-- /Pre-release/
553553--
554554{-# INLINABLE sliceBeginWith #-}
555555sliceBeginWith ::
@@ -638,7 +638,7 @@ wordBy f = K.toParserK . D.wordBy f
638638-- >>> runGroupsBy (<) [3, 5, 4, 1, 2, 0]
639639-- [[3,5,4],[1,2],[0]]
640640--
641−-- /Internal/
641+-- /Pre-release/
642642--
643643{-# INLINABLE groupBy #-}
644644groupBy :: MonadCatch m => (a -> a -> Bool) -> Fold m a b -> Parser m a b
@@ -672,7 +672,7 @@ groupBy eq = K.toParserK . D.groupBy eq
672672-- >>> runGroupsByRolling (<) [3, 5, 4, 1, 2, 0]
673673-- [[3,5],[4],[1,2],[0]]
674674--
675−-- /Internal/
675+-- /Pre-release/
676676--
677677{-# INLINABLE groupByRolling #-}
678678groupByRolling :: MonadCatch m => (a -> a -> Bool) -> Fold m a b -> Parser m a b
@@ -685,7 +685,7 @@ groupByRolling eq = K.toParserK . D.groupByRolling eq
685685-- >>> Stream.parse (Parser.eqBy (==) "mismatch") $ Stream.fromList "match"
686686-- *** Exception: ParseError "eqBy: failed, yet to match 7 elements"
687687--
688−-- /Internal/
688+-- /Pre-release/
689689--
690690{-# INLINE eqBy #-}
691691eqBy :: MonadCatch m => (a -> a -> Bool) -> [a] -> Parser m a ()
@@ -735,7 +735,7 @@ eqBy cmp = K.toParserK . D.eqBy cmp
735735-- spanByRolling eq f1 f2 = splitWith (,) ('groupByRolling' eq f1) ('fromFold' f2)
736736-- @
737737--
738−-- /Internal/
738+-- /Pre-release/
739739--
740740{-# INLINE splitWith #-}
741741splitWith :: MonadCatch m
@@ -761,7 +761,7 @@ splitWith f p1 p2 =
761761-- operations, and can be faster than 'Applicative' instance for small
762762-- number (less than 8) of compositions.
763763--
764−-- /Internal/
764+-- /Pre-release/
765765--
766766{-# INLINE split_ #-}
767767split_ :: MonadCatch m => Parser m x a -> Parser m x b -> Parser m x b
@@ -771,7 +771,7 @@ split_ p1 p2 = K.toParserK $ D.split_ (K.fromParserK p1) (K.fromParserK p2)
771771-- of them succeed or anyone of them fails and combines their output using @f@.
772772-- The parser succeeds if both the parsers succeed.
773773--
774−-- /Internal/
774+-- /Pre-release/
775775--
776776{-# INLINE teeWith #-}
777777teeWith :: MonadCatch m
@@ -782,7 +782,7 @@ teeWith f p1 p2 =
782782-- | Like 'teeWith' but ends parsing and zips the results, if available,
783783-- whenever the first parser ends.
784784--
785−-- /Internal/
785+-- /Pre-release/
786786--
787787{-# INLINE teeWithFst #-}
788788teeWithFst :: MonadCatch m
@@ -816,7 +816,7 @@ teeWithMin f p1 p2 =
816816-- operations and can be much faster than 'Alternative' instance for small
817817-- number (less than 8) of alternatives.
818818--
819−-- /Internal/
819+-- /Pre-release/
820820--
821821{-# INLINE alt #-}
822822alt :: MonadCatch m => Parser m x a -> Parser m x a -> Parser m x a
@@ -826,7 +826,7 @@ alt p1 p2 = K.toParserK $ D.alt (K.fromParserK p1) (K.fromParserK p2)
826826-- from the one which consumed least input i.e. take the shortest succeeding
827827-- parse.
828828--
829−-- /Internal/
829+-- /Pre-release/
830830--
831831{-# INLINE shortest #-}
832832shortest :: MonadCatch m
@@ -837,7 +837,7 @@ shortest p1 p2 = K.toParserK $ D.shortest (K.fromParserK p1) (K.fromParserK p2)
837837-- from the one which consumed more input i.e. take the longest succeeding
838838-- parse.
839839--
840−-- /Internal/
840+-- /Pre-release/
841841--
842842{-# INLINE longest #-}
843843longest :: MonadCatch m
@@ -846,7 +846,7 @@ longest p1 p2 = K.toParserK $ D.longest (K.fromParserK p1) (K.fromParserK p2)
846846
847847-- | Run a parser without consuming the input.
848848--
849−-- /Internal/
849+-- /Pre-release/
850850--
851851{-# INLINE lookAhead #-}
852852lookAhead :: MonadCatch m => Parser m a b -> Parser m a b
@@ -913,7 +913,7 @@ concatSequence _f _p = undefined
913913-- operations and can be much faster than 'Monad' instance for small number
914914-- (less than 8) of compositions.
915915--
916−-- /Internal/
916+-- /Pre-release/
917917--
918918{-# INLINE concatMap #-}
919919concatMap :: MonadCatch m
@@ -964,7 +964,7 @@ manyP _f _p = undefined -- K.toParserK $ D.manyP f (K.fromParserK p)
964964--
965965-- Compare with 'Control.Applicative.many'.
966966--
967−-- /Internal/
967+-- /Pre-release/
968968--
969969{-# INLINE many #-}
970970many :: MonadCatch m => Fold m b c -> Parser m a b -> Parser m a c
@@ -985,7 +985,7 @@ many f p = K.toParserK $ D.many f (K.fromParserK p)
985985--
986986-- Compare with 'Control.Applicative.some'.
987987--
988−-- /Internal/
988+-- /Pre-release/
989989--
990990{-# INLINE some #-}
991991some :: MonadCatch m => Fold m b c -> Parser m a b -> Parser m a c
@@ -1044,7 +1044,7 @@ manyTillP _f _p1 _p2 = undefined
10441044--
10451045-- Stops when the fold @f@ stops.
10461046--
1047−-- /Internal/
1047+-- /Pre-release/
10481048--
10491049{-# INLINE manyTill #-}
10501050manyTill :: MonadCatch m
src/Streamly/Internal/Data/Parser/ParserD.hs+21−21
@@ -188,7 +188,7 @@ import Streamly.Internal.Data.Parser.ParserD.Types
188188--
189189-- | See 'Streamly.Internal.Data.Parser.fromFold'.
190190--
191−-- /Internal/
191+-- /Pre-release/
192192--
193193{-# INLINE fromFold #-}
194194fromFold :: Monad m => Fold m a b -> Parser m a b
@@ -216,7 +216,7 @@ fromFold (Fold fstep finitial fextract) = Parser step initial fextract
216216
217217-- | See 'Streamly.Internal.Data.Parser.peek'.
218218--
219−-- /Internal/
219+-- /Pre-release/
220220--
221221{-# INLINABLE peek #-}
222222peek :: MonadThrow m => Parser m a a
@@ -232,7 +232,7 @@ peek = Parser step initial extract
232232
233233-- | See 'Streamly.Internal.Data.Parser.eof'.
234234--
235−-- /Internal/
235+-- /Pre-release/
236236--
237237{-# INLINABLE eof #-}
238238eof :: Monad m => Parser m a ()
@@ -246,7 +246,7 @@ eof = Parser step initial return
246246
247247-- | See 'Streamly.Internal.Data.Parser.satisfy'.
248248--
249−-- /Internal/
249+-- /Pre-release/
250250--
251251{-# INLINE satisfy #-}
252252satisfy :: MonadThrow m => (a -> Bool) -> Parser m a a
@@ -265,7 +265,7 @@ satisfy predicate = Parser step initial extract
265265
266266-- | See 'Streamly.Internal.Data.Parser.maybe'.
267267--
268−-- /Internal/
268+-- /Pre-release/
269269--
270270{-# INLINE maybe #-}
271271maybe :: MonadThrow m => (a -> Maybe b) -> Parser m a b
@@ -284,7 +284,7 @@ maybe parser = Parser step initial extract
284284
285285-- | See 'Streamly.Internal.Data.Parser.either'.
286286--
287−-- /Internal/
287+-- /Pre-release/
288288--
289289{-# INLINE either #-}
290290either :: MonadThrow m => (a -> Either String b) -> Parser m a b
@@ -307,7 +307,7 @@ either parser = Parser step initial extract
307307
308308-- | See 'Streamly.Internal.Data.Parser.takeBetween'.
309309--
310−-- /Internal/
310+-- /Pre-release/
311311--
312312{-# INLINE takeBetween #-}
313313takeBetween :: MonadCatch m => Int -> Int -> Fold m a b -> Parser m a b
@@ -371,7 +371,7 @@ takeBetween low high (Fold fstep finitial fextract) =
371371
372372-- | See 'Streamly.Internal.Data.Parser.takeEQ'.
373373--
374−-- /Internal/
374+-- /Pre-release/
375375--
376376{-# INLINE takeEQ #-}
377377takeEQ :: MonadThrow m => Int -> Fold m a b -> Parser m a b
@@ -427,7 +427,7 @@ takeEQ n (Fold fstep finitial fextract) = Parser step initial extract
427427
428428-- | See 'Streamly.Internal.Data.Parser.takeGE'.
429429--
430−-- /Internal/
430+-- /Pre-release/
431431--
432432{-# INLINE takeGE #-}
433433takeGE :: MonadThrow m => Int -> Fold m a b -> Parser m a b
@@ -479,7 +479,7 @@ takeGE n (Fold fstep finitial fextract) = Parser step initial extract
479479
480480-- | See 'Streamly.Internal.Data.Parser.takeWhile'.
481481--
482−-- /Internal/
482+-- /Pre-release/
483483--
484484{-# INLINE takeWhile #-}
485485takeWhile :: Monad m => (a -> Bool) -> Fold m a b -> Parser m a b
@@ -506,7 +506,7 @@ takeWhile predicate (Fold fstep finitial fextract) =
506506
507507-- | See 'Streamly.Internal.Data.Parser.takeWhile1'.
508508--
509−-- /Internal/
509+-- /Pre-release/
510510--
511511{-# INLINE takeWhile1 #-}
512512takeWhile1 :: MonadThrow m => (a -> Bool) -> Fold m a b -> Parser m a b
@@ -548,7 +548,7 @@ takeWhile1 predicate (Fold fstep finitial fextract) =
548548
549549-- | See 'Streamly.Internal.Data.Parser.sliceSepByP'.
550550--
551−-- /Internal/
551+-- /Pre-release/
552552--
553553sliceSepByP :: MonadCatch m =>
554554 (a -> Bool) -> Parser m a b -> Parser m a b
@@ -569,7 +569,7 @@ sliceSepByP cond (Parser pstep pinitial pextract) =
569569
570570-- | See 'Streamly.Internal.Data.Parser.sliceBeginWith'.
571571--
572−-- /Internal/
572+-- /Pre-release/
573573--
574574data SliceBeginWithState s = Left' s | Right' s
575575
@@ -729,7 +729,7 @@ groupByRolling eq (Fold fstep finitial fextract) = Parser step initial extract
729729--
730730-- | See 'Streamly.Internal.Data.Parser.eqBy'.
731731--
732−-- /Internal/
732+-- /Pre-release/
733733--
734734{-# INLINE eqBy #-}
735735eqBy :: MonadThrow m => (a -> a -> Bool) -> [a] -> Parser m a ()
@@ -781,7 +781,7 @@ eqBy cmp str = Parser step initial extract
781781--
782782-- @
783783--
784−-- /Internal/
784+-- /Pre-release/
785785{-# INLINE span #-}
786786span :: Monad m => (a -> Bool) -> Fold m a b -> Fold m a c -> Parser m a (b, c)
787787span p f1 f2 = noErrorUnsafeSplitWith (,) (takeWhile p f1) (fromFold f2)
@@ -790,7 +790,7 @@ span p f1 f2 = noErrorUnsafeSplitWith (,) (takeWhile p f1) (fromFold f2)
790790-- long as the predicate applied to the first element of the stream and next
791791-- input element holds 'True', the second group takes the rest of the input.
792792--
793−-- /Internal/
793+-- /Pre-release/
794794--
795795{-# INLINE spanBy #-}
796796spanBy ::
@@ -801,7 +801,7 @@ spanBy eq f1 f2 = noErrorUnsafeSplitWith (,) (groupBy eq f1) (fromFold f2)
801801-- | Like 'spanBy' but applies the predicate in a rolling fashion i.e.
802802-- predicate is applied to the previous and the next input elements.
803803--
804−-- /Internal/
804+-- /Pre-release/
805805{-# INLINE spanByRolling #-}
806806spanByRolling ::
807807 Monad m
@@ -815,7 +815,7 @@ spanByRolling eq f1 f2 =
815815
816816-- | See 'Streamly.Internal.Data.Parser.lookahead'.
817817--
818−-- /Internal/
818+-- /Pre-release/
819819--
820820{-# INLINE lookAhead #-}
821821lookAhead :: MonadThrow m => Parser m a b -> Parser m a b
@@ -899,7 +899,7 @@ choice _ps = undefined
899899--
900900-- | See 'Streamly.Internal.Data.Parser.many'.
901901--
902−-- /Internal/
902+-- /Pre-release/
903903--
904904{-# INLINE many #-}
905905many :: MonadCatch m => Fold m b c -> Parser m a b -> Parser m a c
@@ -908,7 +908,7 @@ many = splitMany
908908
909909-- | See 'Streamly.Internal.Data.Parser.some'.
910910--
911−-- /Internal/
911+-- /Pre-release/
912912--
913913{-# INLINE some #-}
914914some :: MonadCatch m => Fold m b c -> Parser m a b -> Parser m a c
@@ -944,7 +944,7 @@ data ManyTillState fs sr sl
944944
945945-- | See 'Streamly.Internal.Data.Parser.manyTill'.
946946--
947−-- /Internal/
947+-- /Pre-release/
948948--
949949{-# INLINE manyTill #-}
950950manyTill :: MonadCatch m
src/Streamly/Internal/Data/Parser/ParserD/Types.hs+13−13
@@ -222,7 +222,7 @@ instance Functor (Initial s) where
222222-- result left it at. The parser must ensure that the backtrack position is
223223-- always after that.
224224--
225−-- /Internal/
225+-- /Pre-release/
226226--
227227{-# ANN type Step Fuse #-}
228228data Step s b =
@@ -272,7 +272,7 @@ instance Functor (Step s) where
272272-- At any point of time the driver can call @extract@ to inspect the result of
273273-- the fold. It may result in an error or an output value.
274274--
275−-- /Internal/
275+-- /Pre-release/
276276--
277277data Parser m a b =
278278 forall s. Parser (s -> a -> m (Step s b)) (m (Initial s b)) (s -> m b)
@@ -283,7 +283,7 @@ data Parser m a b =
283283-- this exception.
284284-- * When the "extract" function of a parser needs to throw an error.
285285--
286−-- /Internal/
286+-- /Pre-release/
287287--
288288newtype ParseError = ParseError String
289289 deriving Show
@@ -304,7 +304,7 @@ instance Functor m => Functor (Parser m a) where
304304
305305-- | See 'Streamly.Internal.Data.Parser.yield'.
306306--
307−-- /Internal/
307+-- /Pre-release/
308308--
309309{-# INLINE_NORMAL yield #-}
310310yield :: Monad m => b -> Parser m a b
@@ -312,7 +312,7 @@ yield b = Parser undefined (pure $ IDone b) undefined
312312
313313-- | See 'Streamly.Internal.Data.Parser.yieldM'.
314314--
315−-- /Internal/
315+-- /Pre-release/
316316--
317317{-# INLINE yieldM #-}
318318yieldM :: Monad m => m b -> Parser m a b
@@ -334,7 +334,7 @@ data SeqParseState sl f sr = SeqParseL sl | SeqParseR f sr
334334-- compositions the performance starts dipping rapidly beyond a CPS style
335335-- unfused implementation.
336336--
337−-- /Internal/
337+-- /Pre-release/
338338--
339339{-# INLINE splitWith #-}
340340splitWith :: MonadThrow m
@@ -460,7 +460,7 @@ data SeqAState sl sr = SeqAL sl | SeqAR sr
460460-- This turns out to be slightly faster than splitWith
461461-- | See 'Streamly.Internal.Data.Parser.split_'.
462462--
463−-- /Internal/
463+-- /Pre-release/
464464--
465465{-# INLINE split_ #-}
466466split_ :: MonadThrow m => Parser m x a -> Parser m x b -> Parser m x b
@@ -543,7 +543,7 @@ data AltParseState sl sr = AltParseL Int sl | AltParseR sr
543543--
544544-- | See 'Streamly.Internal.Data.Parser.alt'.
545545--
546−-- /Internal/
546+-- /Pre-release/
547547--
548548{-# INLINE alt #-}
549549alt :: Monad m => Parser m x a -> Parser m x a -> Parser m x a
@@ -598,7 +598,7 @@ alt (Parser stepL initialL extractL) (Parser stepR initialR extractR) =
598598
599599-- | See documentation of 'Streamly.Internal.Data.Parser.many'.
600600--
601−-- /Internal/
601+-- /Pre-release/
602602--
603603{-# INLINE splitMany #-}
604604splitMany :: MonadCatch m => Fold m b c -> Parser m a b -> Parser m a c
@@ -658,7 +658,7 @@ splitMany (Fold fstep finitial fextract) (Parser step1 initial1 extract1) =
658658
659659-- | See documentation of 'Streamly.Internal.Data.Parser.some'.
660660--
661−-- /Internal/
661+-- /Pre-release/
662662--
663663{-# INLINE splitSome #-}
664664splitSome :: MonadCatch m => Fold m b c -> Parser m a b -> Parser m a c
@@ -751,7 +751,7 @@ splitSome (Fold fstep finitial fextract) (Parser step1 initial1 extract1) =
751751
752752-- | See 'Streamly.Internal.Data.Parser.die'.
753753--
754−-- /Internal/
754+-- /Pre-release/
755755--
756756{-# INLINE_NORMAL die #-}
757757die :: MonadThrow m => String -> Parser m a b
@@ -759,7 +759,7 @@ die err = Parser undefined (pure (IError err)) undefined
759759
760760-- | See 'Streamly.Internal.Data.Parser.dieM'.
761761--
762−-- /Internal/
762+-- /Pre-release/
763763--
764764{-# INLINE dieM #-}
765765dieM :: MonadThrow m => m String -> Parser m a b
@@ -801,7 +801,7 @@ data ConcatParseState sl m a b =
801801
802802-- | See 'Streamly.Internal.Data.Parser.concatMap'.
803803--
804−-- /Internal/
804+-- /Pre-release/
805805--
806806{-# INLINE concatMap #-}
807807concatMap :: MonadThrow m =>
src/Streamly/Internal/Data/Parser/ParserK/Types.hs+9−9
@@ -48,7 +48,7 @@ import qualified Streamly.Internal.Data.Parser.ParserD.Types as D
4848-- | The parse driver result. The driver may stop with a final result, pause
4949-- with a continuation to resume, or fail with an error.
5050--
51−-- /Internal/
51+-- /Pre-release/
5252--
5353data Driver m a r =
5454 Stop !Int r
@@ -66,7 +66,7 @@ instance Functor m => Functor (Driver m a) where
6666
6767-- The parser's result.
6868--
69−-- /Internal/
69+-- /Pre-release/
7070--
7171data Parse b =
7272 Done !Int !b -- Done, no more input needed
@@ -179,7 +179,7 @@ parseDToK pstep initial extract leftover (level, count) cont = do
179179
180180-- | Convert a direct style 'D.Parser' to a CPS style 'Parser'.
181181--
182−-- /Internal/
182+-- /Pre-release/
183183--
184184{-# INLINE_LATE toParserK #-}
185185toParserK :: MonadCatch m => D.Parser m a b -> Parser m a b
@@ -200,7 +200,7 @@ parserDone _ (Error e) = return $ Failed e
200200
201201-- | When there is no more input to feed, extract the result from the Parser.
202202--
203−-- /Internal/
203+-- /Pre-release/
204204--
205205extractParse :: MonadThrow m => (Maybe a -> m (Driver m a b)) -> m b
206206extractParse cont = do
@@ -218,7 +218,7 @@ data FromParserK b c = FPKDone !Int !b | FPKCont c
218218-- "initial" returns a continuation which can be called one input at a time
219219-- using the "step" function.
220220--
221−-- /Internal/
221+-- /Pre-release/
222222--
223223{-# INLINE_LATE fromParserK #-}
224224fromParserK :: MonadThrow m => Parser m a b -> D.Parser m a b
@@ -279,7 +279,7 @@ instance Functor m => Functor (Parser m a) where
279279--
280280-- | A parser that always yields a pure value without consuming any input.
281281--
282−-- /Internal/
282+-- /Pre-release/
283283--
284284{-# INLINE yield #-}
285285yield :: b -> Parser m a b
@@ -287,7 +287,7 @@ yield b = MkParser $ \lo st yieldk -> yieldk st (Done lo b)
287287
288288-- | See 'Streamly.Internal.Data.Parser.yieldM'.
289289--
290−-- /Internal/
290+-- /Pre-release/
291291--
292292{-# INLINE yieldM #-}
293293yieldM :: Monad m => m b -> Parser m a b
@@ -333,7 +333,7 @@ instance Monad m => Applicative (Parser m a) where
333333-- | A parser that always fails with an error message without consuming
334334-- any input.
335335--
336−-- /Internal/
336+-- /Pre-release/
337337--
338338{-# INLINE die #-}
339339die :: String -> Parser m a b
@@ -457,7 +457,7 @@ instance Monad m => Alternative (Parser m a) where
457457-- | 'mzero' is same as 'empty', it aborts the parser. 'mplus' is same as
458458-- '<|>', it selects the first succeeding parser.
459459--
460−-- /Internal/
460+-- /Pre-release/
461461--
462462instance Monad m => MonadPlus (Parser m a) where
463463 {-# INLINE mzero #-}
src/Streamly/Internal/Data/Producer.hs+2−2
@@ -61,7 +61,7 @@ import Prelude hiding (concat)
6161
6262-- | Simplify a producer to an unfold.
6363--
64−-- /Internal/
64+-- /Pre-release/
6565{-# INLINE simplify #-}
6666simplify :: Producer m a b -> Unfold m a b
6767simplify (Producer step inject _) = Unfold step inject
@@ -72,7 +72,7 @@ simplify (Producer step inject _) = Unfold step inject
7272
7373-- | Convert a StreamD stream into a producer.
7474--
75−-- /Internal/
75+-- /Pre-release/
7676{-# INLINE_NORMAL fromStreamD #-}
7777fromStreamD :: Monad m => Producer m (Stream m a) a
7878fromStreamD = Producer step return return
src/Streamly/Internal/Data/Producer/Source.hs+5−5
@@ -53,14 +53,14 @@ data Source a b = Source [b] (Maybe a)
5353
5454-- | Make a source from a seed value. The buffer would start as empty.
5555--
56−-- /Internal/
56+-- /Pre-release/
5757source :: Maybe a -> Source a b
5858source = Source []
5959
6060-- | Return some unused data back to the source. The data is prepended (or
6161-- consed) to the source.
6262--
63−-- /Internal/
63+-- /Pre-release/
6464unread :: [b] -> Source a b -> Source a b
6565unread xs (Source ys seed) = Source (xs ++ ys) seed
6666
@@ -72,7 +72,7 @@ isEmpty _ = False
7272-- | Convert a producer to a producer from a buffered source. Any buffered data
7373-- is read first and then the seed is unfolded.
7474--
75−-- /Internal/
75+-- /Pre-release/
7676{-# INLINE_NORMAL producer #-}
7777producer :: Monad m => Producer m a b -> Producer m (Source a b) b
7878producer (Producer step1 inject1 extract1) = Producer step inject extract
@@ -195,7 +195,7 @@ parseD
195195-- | Parse a buffered source using a parser, returning the parsed value and the
196196-- remaining source.
197197--
198−-- /Internal/
198+-- /Pre-release/
199199{-# INLINE [3] parse #-}
200200parse
201201 :: MonadThrow m
@@ -229,7 +229,7 @@ parseManyD parser reader = Producer step return return
229229-- | Apply a parser repeatedly on a buffered source producer to generate a
230230-- producer of parsed values.
231231--
232−-- /Internal/
232+-- /Pre-release/
233233{-# INLINE parseMany #-}
234234parseMany :: MonadThrow m =>
235235 ParserK.Parser m a b
src/Streamly/Internal/Data/Producer/Type.hs+6−6
@@ -43,7 +43,7 @@ import Prelude hiding (concat, map)
4343-- | A @Producer m a b@ is a generator of a stream of values of type @b@ from a
4444-- seed of type 'a' in 'Monad' @m@.
4545--
46−-- /Internal/
46+-- /Pre-release/
4747
4848data Producer m a b =
4949 -- | @Producer step inject extract@
@@ -81,7 +81,7 @@ unfoldrM next = Producer step return return
8181
8282-- | Convert a list of pure values to a 'Stream'
8383--
84−-- /Internal/
84+-- /Pre-release/
8585{-# INLINE_LATE fromList #-}
8686fromList :: Monad m => Producer m [a] a
8787fromList = Producer step return return
@@ -98,7 +98,7 @@ fromList = Producer step return return
9898
9999-- | Interconvert the producer between two interconvertible input types.
100100--
101−-- /Internal/
101+-- /Pre-release/
102102{-# INLINE_NORMAL translate #-}
103103translate :: Functor m =>
104104 (a -> c) -> (c -> a) -> Producer m c b -> Producer m a b
@@ -107,7 +107,7 @@ translate f g (Producer step inject extract) =
107107
108108-- | Map the producer input to another value of the same type.
109109--
110−-- /Internal/
110+-- /Pre-release/
111111{-# INLINE_NORMAL lmap #-}
112112lmap :: (a -> a) -> Producer m a b -> Producer m a b
113113lmap f (Producer step inject extract) = Producer step (inject . f) extract
@@ -118,7 +118,7 @@ lmap f (Producer step inject extract) = Producer step (inject . f) extract
118118
119119-- | Map a function on the output of the producer (the type @b@).
120120--
121−-- /Internal/
121+-- /Pre-release/
122122{-# INLINE_NORMAL map #-}
123123map :: Functor m => (b -> c) -> Producer m a b -> Producer m a c
124124map f (Producer ustep uinject uextract) = Producer step uinject uextract
@@ -144,7 +144,7 @@ data NestedLoop s1 s2 = OuterLoop s1 | InnerLoop s1 s2
144144-- | Apply the second unfold to each output element of the first unfold and
145145-- flatten the output in a single stream.
146146--
147−-- /Internal/
147+-- /Pre-release/
148148--
149149{-# INLINE_NORMAL concat #-}
150150concat :: Monad m =>
src/Streamly/Internal/Data/Stream/Async.hs+2−2
@@ -491,7 +491,7 @@ newAsyncVar st m = do
491491-- | Generate a stream asynchronously to keep it buffered, lazily consume
492492-- from the buffer.
493493--
494−-- /Internal/
494+-- /Pre-release/
495495--
496496{-# INLINABLE mkAsyncK #-}
497497mkAsyncK :: (IsStream t, MonadAsync m) => t m a -> t m a
@@ -525,7 +525,7 @@ mkAsyncD m = D.Stream step Nothing
525525-- kicked off again to evaluate the remaining stream when there is space in the
526526-- buffer. The consumer consumes the stream lazily from the buffer.
527527--
528−-- /Internal/
528+-- /Pre-release/
529529--
530530{-# INLINE_NORMAL mkAsync #-}
531531mkAsync :: (K.IsStream t, MonadAsync m) => t m a -> t m a
src/Streamly/Internal/Data/Stream/IsStream/Combinators.hs+1−1
@@ -224,7 +224,7 @@ printState st = liftIO $ do
224224
225225-- | Print debug information about an SVar when the stream ends
226226--
227−-- /Internal/
227+-- /Pre-release/
228228--
229229inspectMode :: IsStream t => t m a -> t m a
230230inspectMode m = mkStream $ \st stp sng yld ->
src/Streamly/Internal/Data/Stream/IsStream/Common.hs+8−8
@@ -177,7 +177,7 @@ repeatMSerial = fromStreamS . S.repeatM
177177--
178178-- Note: This API is not safe on 32-bit machines.
179179--
180−-- /Internal/
180+-- /Pre-release/
181181--
182182{-# INLINE timesWith #-}
183183timesWith :: (IsStream t, MonadAsync m) => Double -> t m (AbsTime, RelTime64)
@@ -195,7 +195,7 @@ timesWith g = fromStreamD $ D.times g
195195--
196196-- Note: This API is not safe on 32-bit machines.
197197--
198−-- /Internal/
198+-- /Pre-release/
199199--
200200{-# INLINE absTimesWith #-}
201201absTimesWith :: (IsStream t, MonadAsync m, Functor (t m))
@@ -214,7 +214,7 @@ absTimesWith = fmap (uncurry addToAbsTime64) . timesWith
214214--
215215-- Note: This API is not safe on 32-bit machines.
216216--
217−-- /Internal/
217+-- /Pre-release/
218218--
219219{-# INLINE relTimesWith #-}
220220relTimesWith :: (IsStream t, MonadAsync m, Functor (t m))
@@ -263,7 +263,7 @@ fold = P.foldOnce
263263-- scan and release it when the stream ends or to flush the internal state of
264264-- the scan at the end.
265265--
266−-- /Internal/
266+-- /Pre-release/
267267--
268268{-# INLINE scanlMAfter' #-}
269269scanlMAfter' :: (IsStream t, Monad m)
@@ -306,7 +306,7 @@ postscanlM' step z m = fromStreamD $ D.postscanlM' step z $ toStreamD m
306306--
307307-- See also: 'scanlM''
308308--
309−-- /Internal/
309+-- /Pre-release/
310310--
311311{-# INLINE smapM #-}
312312smapM :: (IsStream t, Monad m) =>
@@ -393,7 +393,7 @@ intersperseM m = fromStreamS . S.intersperseM m . toStreamS
393393-- h,e,l,l,o
394394-- @
395395--
396−-- /Internal/
396+-- /Pre-release/
397397{-# INLINE interjectSuffix #-}
398398interjectSuffix
399399 :: (IsStream t, MonadAsync m)
@@ -425,7 +425,7 @@ reverse s = fromStreamS $ S.reverse $ toStreamS s
425425
426426-- | Like 'reverse' but several times faster, requires a 'Storable' instance.
427427--
428−-- /Internal/
428+-- /Pre-release/
429429{-# INLINE reverse' #-}
430430reverse' :: (IsStream t, MonadIO m, Storable a) => t m a -> t m a
431431reverse' s = fromStreamD $ D.reverse' $ toStreamD s
@@ -508,7 +508,7 @@ concatM generator = concatMapM (\() -> generator) (yield ())
508508--
509509-- > splitOn . intercalate == id
510510--
511−-- /Internal/
511+-- /Pre-release/
512512
513513-- XXX We can use a polymorphic vector implemented by Array# to represent the
514514-- sequence, that way we can avoid the Storable constraint. If we still need
src/Streamly/Internal/Data/Stream/IsStream/Eliminate.hs+10−10
@@ -334,7 +334,7 @@ runSink = fold . toFold
334334
335335-- | Parse a stream using the supplied 'Parser'.
336336--
337−-- /Internal/
337+-- /Pre-release/
338338--
339339{-# INLINE_NORMAL parseD #-}
340340parseD :: MonadThrow m => PRD.Parser m a b -> SerialT m a -> m b
@@ -360,7 +360,7 @@ parseK = parse
360360--
361361-- @parse p@ is not the same as @head . parseMany p@ on an empty stream.
362362--
363−-- /Internal/
363+-- /Pre-release/
364364--
365365{-# INLINE [3] parse #-}
366366parse :: MonadThrow m => Parser m a b -> SerialT m a -> m b
@@ -473,7 +473,7 @@ head = S.head . toStreamS
473473-- supplied default value. It can help avoid one branch in high performance
474474-- code.
475475--
476−-- /Internal/
476+-- /Pre-release/
477477{-# INLINE headElse #-}
478478headElse :: Monad m => a -> SerialT m a -> m a
479479headElse x = D.headElse x . toStreamD
@@ -591,7 +591,7 @@ product = foldl' (*) 1
591591--
592592-- > mconcat = fold Fold.mconcat
593593--
594−-- /Internal/
594+-- /Pre-release/
595595{-# INLINE mconcat #-}
596596mconcat :: (Monad m, Monoid a) => SerialT m a -> m a
597597mconcat = foldr mappend mempty
@@ -740,7 +740,7 @@ toList = P.toList
740740-- /Warning!/ working on large lists accumulated as buffers in memory could be
741741-- very inefficient, consider using "Streamly.Array" instead.
742742--
743−-- /Internal/
743+-- /Pre-release/
744744{-# INLINE toListRev #-}
745745toListRev :: Monad m => SerialT m a -> m [a]
746746toListRev = D.toListRev . toStreamD
@@ -770,7 +770,7 @@ toHandle h = go
770770-- toStream = foldr cons nil
771771-- @
772772--
773−-- /Internal/
773+-- /Pre-release/
774774--
775775{-# INLINE toStream #-}
776776toStream :: Monad m => SerialT m a -> m (SerialT Identity a)
@@ -782,7 +782,7 @@ toStream = foldr K.cons K.nil
782782-- toStreamRev = foldl' (flip cons) nil
783783-- @
784784--
785−-- /Internal/
785+-- /Pre-release/
786786--
787787{-# INLINE toStreamRev #-}
788788toStreamRev :: Monad m => SerialT m a -> m (SerialT Identity a)
@@ -876,7 +876,7 @@ isPrefixOf m1 m2 = D.isPrefixOf (toStreamD m1) (toStreamD m2)
876876--
877877-- Space: @O(n)@ worst case where @n@ is the length of the infix.
878878--
879−-- /Internal/
879+-- /Pre-release/
880880--
881881-- /Requires 'Storable' constraint/ - Help wanted.
882882--
@@ -915,7 +915,7 @@ isInfixOf infx stream = do
915915--
916916-- Space: @O(n)@, buffers entire input stream and the suffix.
917917--
918−-- /Internal/
918+-- /Pre-release/
919919--
920920-- /Suboptimal/ - Help wanted.
921921--
@@ -970,7 +970,7 @@ stripPrefix m1 m2 = fmap fromStreamD <$>
970970--
971971-- Space: @O(n)@, buffers the entire input stream as well as the suffix
972972--
973−-- /Internal/
973+-- /Pre-release/
974974{-# INLINE stripSuffix #-}
975975stripSuffix
976976 :: (Monad m, Eq a)
src/Streamly/Internal/Data/Stream/IsStream/Exception.hs+4−4
@@ -55,7 +55,7 @@ before action xs = D.fromStreamD $ D.before action $ D.toStreamD xs
5555--
5656-- > after_ action xs = xs <> 'nilM' action
5757--
58−-- /Internal/
58+-- /Pre-release/
5959--
6060{-# INLINE after_ #-}
6161after_ :: (IsStream t, Monad m) => m b -> t m a -> t m a
@@ -95,7 +95,7 @@ onException action xs = D.fromStreamD $ D.onException action $ D.toStreamD xs
9595--
9696-- /Inhibits stream fusion/
9797--
98−-- /Internal/
98+-- /Pre-release/
9999--
100100{-# INLINE finally_ #-}
101101finally_ :: (IsStream t, MonadCatch m) => m b -> t m a -> t m a
@@ -132,7 +132,7 @@ finally action xs = D.fromStreamD $ D.finally action $ D.toStreamD xs
132132--
133133-- /Inhibits stream fusion/
134134--
135−-- /Internal/
135+-- /Pre-release/
136136--
137137{-# INLINE bracket_ #-}
138138bracket_ :: (IsStream t, MonadCatch m)
@@ -179,7 +179,7 @@ bracket bef aft bet = D.fromStreamD $
179179--
180180-- /Inhibits stream fusion/
181181--
182−-- /Internal/
182+-- /Pre-release/
183183--
184184{-# INLINE ghandle #-}
185185ghandle :: (IsStream t, MonadCatch m, Exception e)
src/Streamly/Internal/Data/Stream/IsStream/Generate.hs+5−5
@@ -142,7 +142,7 @@ unfold unf x = fromStreamD $ D.unfold unf x
142142
143143-- | Convert an 'Unfold' with a closed input end into a stream.
144144--
145−-- /Internal/
145+-- /Pre-release/
146146{-# INLINE unfold0 #-}
147147unfold0 :: (IsStream t, Monad m) => Unfold m Void b -> t m b
148148unfold0 unf = unfold unf (error "unfold0: unexpected void evaluation")
@@ -296,7 +296,7 @@ replicateMSerial n = fromStreamS . S.replicateM n
296296--
297297-- Note: This API is not safe on 32-bit machines.
298298--
299−-- /Internal/
299+-- /Pre-release/
300300--
301301{-# INLINE times #-}
302302times :: (IsStream t, MonadAsync m) => t m (AbsTime, RelTime64)
@@ -312,7 +312,7 @@ times = timesWith 0.01
312312--
313313-- Note: This API is not safe on 32-bit machines.
314314--
315−-- /Internal/
315+-- /Pre-release/
316316--
317317{-# INLINE absTimes #-}
318318absTimes :: (IsStream t, MonadAsync m, Functor (t m)) => t m AbsTime
@@ -334,7 +334,7 @@ currentTime = absTimesWith
334334--
335335-- Note: This API is not safe on 32-bit machines.
336336--
337−-- /Internal/
337+-- /Pre-release/
338338--
339339{-# INLINE relTimes #-}
340340relTimes :: (IsStream t, MonadAsync m, Functor (t m)) => t m RelTime64
@@ -559,7 +559,7 @@ fromHandle h = go
559559-- callback when invoked adds a value at the tail of the stream. Returns a
560560-- stream of values generated by the callback.
561561--
562−-- /Internal/
562+-- /Pre-release/
563563--
564564{-# INLINE fromCallback #-}
565565fromCallback :: MonadAsync m => ((a -> m ()) -> m ()) -> SerialT m a
src/Streamly/Internal/Data/Stream/IsStream/Nesting.hs+37−37
@@ -328,7 +328,7 @@ import Prelude hiding (zipWith, concatMap, concat)
328328-- but use 'concatMap' or 'concatMapWith serial' for appending @n@ streams or
329329-- infinite containers of streams.
330330--
331−-- /Internal/
331+-- /Pre-release/
332332{-# INLINE append #-}
333333append ::(IsStream t, Monad m) => t m b -> t m b -> t m b
334334append m1 m2 = fromStreamD $ D.append (toStreamD m1) (toStreamD m2)
@@ -360,7 +360,7 @@ append m1 m2 = fromStreamD $ D.append (toStreamD m1) (toStreamD m2)
360360--
361361-- Do not use at scale in concatMapWith.
362362--
363−-- /Internal/
363+-- /Pre-release/
364364{-# INLINE interleave #-}
365365interleave ::(IsStream t, Monad m) => t m b -> t m b -> t m b
366366interleave m1 m2 = fromStreamD $ D.interleave (toStreamD m1) (toStreamD m2)
@@ -383,7 +383,7 @@ interleave m1 m2 = fromStreamD $ D.interleave (toStreamD m1) (toStreamD m2)
383383--
384384-- Do not use at scale in concatMapWith.
385385--
386−-- /Internal/
386+-- /Pre-release/
387387{-# INLINE interleaveSuffix #-}
388388interleaveSuffix ::(IsStream t, Monad m) => t m b -> t m b -> t m b
389389interleaveSuffix m1 m2 =
@@ -407,7 +407,7 @@ interleaveSuffix m1 m2 =
407407--
408408-- Do not use at scale in concatMapWith.
409409--
410−-- /Internal/
410+-- /Pre-release/
411411{-# INLINE interleaveInfix #-}
412412interleaveInfix ::(IsStream t, Monad m) => t m b -> t m b -> t m b
413413interleaveInfix m1 m2 =
@@ -430,7 +430,7 @@ interleaveInfix m1 m2 =
430430--
431431-- Do not use at scale in concatMapWith.
432432--
433−-- /Internal/
433+-- /Pre-release/
434434{-# INLINE interleaveMin #-}
435435interleaveMin ::(IsStream t, Monad m) => t m b -> t m b -> t m b
436436interleaveMin m1 m2 = fromStreamD $ D.interleaveMin (toStreamD m1) (toStreamD m2)
@@ -450,7 +450,7 @@ interleaveMin m1 m2 = fromStreamD $ D.interleaveMin (toStreamD m1) (toStreamD m2
450450--
451451-- Do not use at scale in concatMapWith.
452452--
453−-- /Internal/
453+-- /Pre-release/
454454{-# INLINE roundrobin #-}
455455roundrobin ::(IsStream t, Monad m) => t m b -> t m b -> t m b
456456roundrobin m1 m2 = fromStreamD $ D.roundRobin (toStreamD m1) (toStreamD m2)
@@ -601,7 +601,7 @@ concatMapWith = K.concatMapBy
601601-- concatSmapMWith combine f initial = concatMapWith combine id . smapM f initial
602602-- @
603603--
604−-- /Internal/
604+-- /Pre-release/
605605--
606606{-# INLINE concatSmapMWith #-}
607607concatSmapMWith
@@ -634,7 +634,7 @@ concatMap f m = fromStreamD $ D.concatMap (toStreamD . f) (toStreamD m)
634634-- concat = concatMap id
635635-- @
636636--
637−-- /Internal/
637+-- /Pre-release/
638638{-# INLINE concat #-}
639639concat :: (IsStream t, Monad m) => t m (t m a) -> t m a
640640concat = concatMap id
@@ -669,7 +669,7 @@ concatMapEitherWith = undefined
669669--
670670-- /Caution: the stream of streams must be finite/
671671--
672−-- /Internal/
672+-- /Pre-release/
673673--
674674{-# INLINE concatPairsWith #-}
675675concatPairsWith :: IsStream t =>
@@ -695,7 +695,7 @@ concatUnfold u m = fromStreamD $ D.concatUnfold u (toStreamD m)
695695-- | Like 'concatUnfold' but interleaves the streams in the same way as
696696-- 'interleave' behaves instead of appending them.
697697--
698−-- /Internal/
698+-- /Pre-release/
699699{-# INLINE concatUnfoldInterleave #-}
700700concatUnfoldInterleave ::(IsStream t, Monad m)
701701 => Unfold m a b -> t m a -> t m b
@@ -705,7 +705,7 @@ concatUnfoldInterleave u m =
705705-- | Like 'concatUnfold' but executes the streams in the same way as
706706-- 'roundrobin'.
707707--
708−-- /Internal/
708+-- /Pre-release/
709709{-# INLINE concatUnfoldRoundrobin #-}
710710concatUnfoldRoundrobin ::(IsStream t, Monad m)
711711 => Unfold m a b -> t m a -> t m b
@@ -723,7 +723,7 @@ concatUnfoldRoundrobin u m =
723723--
724724-- > unwords = S.interpose ' '
725725--
726−-- /Internal/
726+-- /Pre-release/
727727{-# INLINE interpose #-}
728728interpose :: (IsStream t, Monad m)
729729 => c -> Unfold m b c -> t m b -> t m c
@@ -737,7 +737,7 @@ interpose x unf str =
737737--
738738-- > unlines = S.interposeSuffix '\n'
739739--
740−-- /Internal/
740+-- /Pre-release/
741741{-# INLINE interposeSuffix #-}
742742interposeSuffix :: (IsStream t, Monad m)
743743 => c -> Unfold m b c -> t m b -> t m c
@@ -758,7 +758,7 @@ interposeSuffix x unf str =
758758--
759759-- | 'interleaveInfix' followed by unfold and concat.
760760--
761−-- /Internal/
761+-- /Pre-release/
762762{-# INLINE gintercalate #-}
763763gintercalate
764764 :: (IsStream t, Monad m)
@@ -784,7 +784,7 @@ gintercalate unf1 str1 unf2 str2 =
784784-- >>> Stream.toList $ Stream.intercalate " " Unfold.fromList $ Stream.fromList ["abc", "def", "ghi"]
785785-- "abc def ghi"
786786--
787−-- /Internal/
787+-- /Pre-release/
788788{-# INLINE intercalate #-}
789789intercalate :: (IsStream t, Monad m)
790790 => b -> Unfold m b c -> t m b -> t m c
@@ -793,7 +793,7 @@ intercalate seed unf str = D.fromStreamD $
793793
794794-- | 'interleaveSuffix' followed by unfold and concat.
795795--
796−-- /Internal/
796+-- /Pre-release/
797797{-# INLINE gintercalateSuffix #-}
798798gintercalateSuffix
799799 :: (IsStream t, Monad m)
@@ -813,7 +813,7 @@ gintercalateSuffix unf1 str1 unf2 str2 =
813813-- >>> Stream.toList $ Stream.intercalateSuffix "\n" Unfold.fromList $ Stream.fromList ["abc", "def", "ghi"]
814814-- "abc\ndef\nghi\n"
815815--
816−-- /Internal/
816+-- /Pre-release/
817817{-# INLINE intercalateSuffix #-}
818818intercalateSuffix :: (IsStream t, Monad m)
819819 => b -> Unfold m b c -> t m b -> t m c
@@ -846,7 +846,7 @@ intercalateSuffix seed unf str = fromStreamD $ D.concatUnfold unf
846846-- (yield (Left "tmp"))
847847-- @
848848--
849−-- /Internal/
849+-- /Pre-release/
850850--
851851{-# INLINE iterateMapWith #-}
852852iterateMapWith
@@ -883,7 +883,7 @@ iterateUnfold unf xs = undefined
883883--
884884-- See also: 'mfix'
885885--
886−-- /Internal/
886+-- /Pre-release/
887887--
888888{-# INLINE iterateSmapMWith #-}
889889iterateSmapMWith
@@ -922,7 +922,7 @@ iterateSmapMWith combine f initial stream =
922922-- iterateMapLeftsWith serial Dir.toEither (yield (Left "tmp"))
923923-- @
924924--
925−-- /Internal/
925+-- /Pre-release/
926926--
927927{-# INLINE iterateMapLeftsWith #-}
928928iterateMapLeftsWith
@@ -954,7 +954,7 @@ iterateMapLeftsWith combine f = iterateMapWith combine (either f (const K.nil))
954954-- >>> Stream.toList $ Stream.foldManyPost f $ Stream.fromList [1..10]
955955-- [3,7,11,15,19,0]
956956--
957−-- /Internal/
957+-- /Pre-release/
958958--
959959{-# INLINE foldManyPost #-}
960960foldManyPost
@@ -981,7 +981,7 @@ foldManyPost f m = D.fromStreamD $ D.foldManyPost f (D.toStreamD m)
981981-- Note @foldMany (takeLE 0)@ would result in an infinite loop in a non-empty
982982-- stream.
983983--
984−-- /Internal/
984+-- /Pre-release/
985985--
986986{-# INLINE foldMany #-}
987987foldMany
@@ -994,7 +994,7 @@ foldMany f m = D.fromStreamD $ D.foldMany f (D.toStreamD m)
994994-- | Apply a stream of folds to an input stream and emit the results in the
995995-- output stream.
996996--
997−-- /Internal/
997+-- /Pre-release/
998998--
999999{-# INLINE foldSequence #-}
10001000foldSequence
@@ -1020,7 +1020,7 @@ foldSequence _f _m = undefined
10201020-- This is the streaming equivalent of monad like sequenced application of
10211021-- folds where next fold is dependent on the previous fold.
10221022--
1023−-- /Internal/
1023+-- /Pre-release/
10241024--
10251025{-# INLINE foldIterate #-}
10261026foldIterate
@@ -1058,7 +1058,7 @@ foldIterate _f _i _m = undefined
10581058-- Known Issues: When the parser fails there is no way to get the remaining
10591059-- stream.
10601060--
1061−-- /Internal/
1061+-- /Pre-release/
10621062--
10631063{-# INLINE parseMany #-}
10641064parseMany
@@ -1081,7 +1081,7 @@ parseManyD p m =
10811081-- | Apply a stream of parsers to an input stream and emit the results in the
10821082-- output stream.
10831083--
1084−-- /Internal/
1084+-- /Pre-release/
10851085--
10861086{-# INLINE parseSequence #-}
10871087parseSequence
@@ -1119,7 +1119,7 @@ parseManyTill = undefined
11191119-- This is the streaming equivalent of monad like sequenced application of
11201120-- parsers where next parser is dependent on the previous parser.
11211121--
1122−-- /Internal/
1122+-- /Pre-release/
11231123--
11241124{-# INLINE parseIterate #-}
11251125parseIterate
@@ -1591,7 +1591,7 @@ splitOnAny subseq f m = undefined -- D.fromStreamD $ D.splitOnAny f subseq (D.to
15911591-- >>> splitOn'_ "ll" "hello"
15921592-- ["he","ll","o"]
15931593--
1594−-- /Internal/
1594+-- /Pre-release/
15951595{-# INLINE splitBySeq #-}
15961596splitBySeq
15971597 :: (IsStream t, MonadAsync m, Storable a, Enum a, Eq a)
@@ -1640,7 +1640,7 @@ splitBySeq patt f m =
16401640--
16411641-- > splitSuffixOn . intercalateSuffix == id
16421642--
1643−-- /Internal/
1643+-- /Pre-release/
16441644{-# INLINE splitOnSuffixSeq #-}
16451645splitOnSuffixSeq
16461646 :: (IsStream t, MonadIO m, Storable a, Enum a, Eq a)
@@ -1686,7 +1686,7 @@ wordsOn subseq f m = undefined -- D.fromStreamD $ D.wordsOn f subseq (D.toStream
16861686-- >>> splitWithSuffixSeq' "." "a..b.."
16871687-- ["a.",".","b.","."]
16881688--
1689−-- /Internal/
1689+-- /Pre-release/
16901690{-# INLINE splitWithSuffixSeq #-}
16911691splitWithSuffixSeq
16921692 :: (IsStream t, MonadIO m, Storable a, Enum a, Eq a)
@@ -1729,7 +1729,7 @@ chunksOf n f = D.fromStreamD . D.chunksOf n f . D.toStreamD
17291729
17301730-- |
17311731--
1732−-- /Internal/
1732+-- /Pre-release/
17331733{-# INLINE chunksOf2 #-}
17341734chunksOf2
17351735 :: (IsStream t, Monad m)
@@ -1743,7 +1743,7 @@ chunksOf2 n action f m = D.fromStreamD $ D.groupsOf2 n action f (D.toStreamD m)
17431743--
17441744-- > arraysOf n = Stream.foldMany (A.writeN n)
17451745--
1746−-- /Internal/
1746+-- /Pre-release/
17471747{-# INLINE arraysOf #-}
17481748arraysOf :: (IsStream t, MonadIO m, Storable a)
17491749 => Int -> t m a -> t m (Array a)
@@ -1929,7 +1929,7 @@ data SessionState t m k a b = SessionState
19291929-- a new session. This could be useful to alert or eject sessions when the
19301930-- number of sessions becomes too high.
19311931--
1932−-- /Internal/
1932+-- /Pre-release/
19331933--
19341934{-# INLINABLE classifySessionsBy #-}
19351935classifySessionsBy
@@ -2163,7 +2163,7 @@ classifySessionsBy tick tmout reset ejectPred
21632163-- classifyKeepAliveSessions timeout pred = classifySessionsBy 1 timeout True pred
21642164-- @
21652165--
2166−-- /Internal/
2166+-- /Pre-release/
21672167--
21682168{-# INLINABLE classifyKeepAliveSessions #-}
21692169classifyKeepAliveSessions ::
@@ -2236,7 +2236,7 @@ classifyChunksOf wsize = classifyChunksBy wsize False
22362236--
22372237-- @
22382238--
2239−-- /Internal/
2239+-- /Pre-release/
22402240--
22412241{-# INLINABLE classifySessionsOf #-}
22422242classifySessionsOf ::
@@ -2265,7 +2265,7 @@ classifySessionsOf interval =
22652265-- CAUTION! This is not a true streaming function as the container size after
22662266-- the split and merge may not be bounded.
22672267--
2268−-- /Internal/
2268+-- /Pre-release/
22692269{-# INLINE splitInnerBy #-}
22702270splitInnerBy
22712271 :: (IsStream t, Monad m)
@@ -2279,7 +2279,7 @@ splitInnerBy splitter joiner xs =
22792279-- | Like 'splitInnerBy' but splits assuming the separator joins the segment in
22802280-- a suffix style.
22812281--
2282−-- /Internal/
2282+-- /Pre-release/
22832283{-# INLINE splitInnerBySuffix #-}
22842284splitInnerBySuffix
22852285 :: (IsStream t, Monad m, Eq (f a), Monoid (f a))
src/Streamly/Internal/Data/Stream/IsStream/Top.hs+11−11
@@ -97,7 +97,7 @@ import Prelude hiding (filter, zipWith, concatMap, concat)
9797-- >>> Stream.toList $ Stream.sampleFromThen 2 3 $ Stream.enumerateFromTo 0 10
9898-- [2,5,8]
9999--
100−-- /Internal/
100+-- /Pre-release/
101101--
102102{-# INLINE sampleFromThen #-}
103103sampleFromThen :: (IsStream t, Monad m, Functor (t m)) =>
@@ -115,7 +115,7 @@ sampleFromThen offset stride =
115115-- sampleIntervalEnd n = Stream.catMaybes . Stream.intervalsOf n Fold.last
116116-- @
117117--
118−-- /Internal/
118+-- /Pre-release/
119119--
120120{-# INLINE sampleIntervalEnd #-}
121121sampleIntervalEnd :: (IsStream t, MonadAsync m, Functor (t m)) =>
@@ -128,7 +128,7 @@ sampleIntervalEnd n = Stream.catMaybes . Stream.intervalsOf n Fold.last
128128-- sampleIntervalStart n = Stream.catMaybes . Stream.intervalsOf n Fold.head
129129-- @
130130--
131−-- /Internal/
131+-- /Pre-release/
132132--
133133{-# INLINE sampleIntervalStart #-}
134134sampleIntervalStart :: (IsStream t, MonadAsync m, Functor (t m)) =>
@@ -143,7 +143,7 @@ sampleIntervalStart n = Stream.catMaybes . Stream.intervalsOf n Fold.head
143143--
144144-- The clock granularity is 10 ms.
145145--
146−-- /Internal/
146+-- /Pre-release/
147147--
148148{-# INLINE sampleBurstEnd #-}
149149sampleBurstEnd :: (IsStream t, MonadAsync m, Functor (t m)) =>
@@ -159,7 +159,7 @@ sampleBurstEnd gap =
159159-- | Like 'sampleBurstEnd' but samples the event at the beginning of the burst
160160-- instead of at the end of it.
161161--
162−-- /Internal/
162+-- /Pre-release/
163163--
164164{-# INLINE sampleBurstStart #-}
165165sampleBurstStart :: (IsStream t, MonadAsync m, Functor (t m)) =>
@@ -186,7 +186,7 @@ sampleBurstStart gap =
186186--
187187-- Note: this is not the fastest possible implementation as of now.
188188--
189−-- /Internal/
189+-- /Pre-release/
190190--
191191{-# INLINE sortBy #-}
192192sortBy :: (IsStream t, Monad m) => (a -> a -> Ordering) -> t m a -> t m a
@@ -231,7 +231,7 @@ sortBy f = Stream.concatPairsWith (Stream.mergeBy f) Stream.yield
231231--
232232-- Time: O(m x n)
233233--
234−-- /Internal/
234+-- /Pre-release/
235235{-# INLINE crossJoin #-}
236236crossJoin :: Monad (t m) => t m a -> t m b -> t m (a, b)
237237crossJoin s1 s2 = do
@@ -259,7 +259,7 @@ crossJoin s1 s2 = do
259259--
260260-- Time: O(m x n)
261261--
262−-- /Internal/
262+-- /Pre-release/
263263{-# INLINE innerJoin #-}
264264innerJoin ::
265265 forall (t :: (Type -> Type) -> Type -> Type) m a b.
@@ -487,7 +487,7 @@ mergeOuterJoin _eq _s1 _s2 = undefined
487487-- Time: O(m x n) where @m@ is the number of elements in the first stream and
488488-- @n@ is the number of elements in the second stream.
489489--
490−-- /Internal/
490+-- /Pre-release/
491491{-# INLINE intersectBy #-}
492492intersectBy :: (IsStream t, Monad m) =>
493493 (a -> a -> Bool) -> t m a -> t m a -> t m a
@@ -533,7 +533,7 @@ mergeIntersectBy _eq _s1 _s2 = undefined
533533-- Time: O(m x n) where @m@ is the number of elements in the first stream and
534534-- @n@ is the number of elements in the second stream.
535535--
536−-- /Internal/
536+-- /Pre-release/
537537{-# INLINE differenceBy #-}
538538differenceBy :: (IsStream t, Monad m) =>
539539 (a -> a -> Bool) -> t m a -> t m a -> t m a
@@ -577,7 +577,7 @@ mergeDifferenceBy _eq _s1 _s2 = undefined
577577--
578578-- Time: O(m x n)
579579--
580−-- /Internal/
580+-- /Pre-release/
581581{-# INLINE unionBy #-}
582582unionBy :: (IsStream t, MonadAsync m, Semigroup (t m a)) =>
583583 (a -> a -> Bool) -> t m a -> t m a -> t m a
src/Streamly/Internal/Data/Stream/IsStream/Transform.hs+31−31
@@ -275,7 +275,7 @@ import Prelude hiding
275275
276276-- | Use a 'Pipe' to transform a stream.
277277--
278−-- /Internal/
278+-- /Pre-release/
279279--
280280{-# INLINE transform #-}
281281transform :: (IsStream t, Monad m) => Pipe m a b -> t m a -> t m b
@@ -312,7 +312,7 @@ transform pipe xs = fromStreamD $ D.transform pipe (toStreamD xs)
312312--
313313-- > foldrM f z s = runIdentityT $ foldrS (\x xs -> lift $ f x (runIdentityT xs)) (lift z) s
314314--
315−-- /Internal/
315+-- /Pre-release/
316316{-# INLINE foldrS #-}
317317foldrS :: IsStream t => (a -> t m b -> t m b) -> t m b -> t m a -> t m b
318318foldrS = K.foldrS
@@ -327,7 +327,7 @@ foldrS = K.foldrS
327327-- 'foldrT' can be used to translate streamly streams to other transformer
328328-- monads e.g. to a different streaming type.
329329--
330−-- /Internal/
330+-- /Pre-release/
331331{-# INLINE foldrT #-}
332332foldrT :: (IsStream t, Monad m, Monad (s m), MonadTrans s)
333333 => (a -> s m b -> s m b) -> s m b -> t m a -> s m b
@@ -431,7 +431,7 @@ tap f xs = D.fromStreamD $ D.tap f (D.toStreamD xs)
431431-- [0,2,4,6,8,10]
432432
433433--
434−-- /Internal/
434+-- /Pre-release/
435435--
436436{-# INLINE tapOffsetEvery #-}
437437tapOffsetEvery :: (IsStream t, Monad m)
@@ -465,7 +465,7 @@ tapOffsetEvery offset n f xs =
465465--
466466-- Compare with 'tap'.
467467--
468−-- /Internal/
468+-- /Pre-release/
469469{-# INLINE tapAsync #-}
470470tapAsync :: (IsStream t, MonadAsync m) => FL.Fold m a b -> t m a -> t m a
471471tapAsync f xs = D.fromStreamD $ Par.tapAsyncF f (D.toStreamD xs)
@@ -485,7 +485,7 @@ tapAsync f xs = D.fromStreamD $ Par.tapAsyncF f (D.toStreamD xs)
485485--
486486-- Note: This may not work correctly on 32-bit machines.
487487--
488−-- /Internal/
488+-- /Pre-release/
489489--
490490{-# INLINE pollCounts #-}
491491pollCounts ::
@@ -516,7 +516,7 @@ pollCounts predicate transf f xs =
516516--
517517-- Note: This may not work correctly on 32-bit machines.
518518--
519−-- /Internal/
519+-- /Pre-release/
520520{-# INLINE tapRate #-}
521521tapRate ::
522522 (IsStream t, MonadAsync m, MonadCatch m)
@@ -555,7 +555,7 @@ trace f = mapM (\x -> void (f x) >> return x)
555555--
556556-- See also: 'trace'
557557--
558−-- /Internal/
558+-- /Pre-release/
559559{-# INLINE trace_ #-}
560560trace_ :: (IsStream t, Monad m) => m b -> t m a -> t m a
561561trace_ eff = Serial.mapM (\x -> eff >> return x)
@@ -688,7 +688,7 @@ postscanl' step z m = fromStreamD $ D.postscanl' step z $ toStreamD m
688688--
689689-- | Like scanl' but does not stream the final value of the accumulator.
690690--
691−-- /Internal/
691+-- /Pre-release/
692692{-# INLINE prescanl' #-}
693693prescanl' :: (IsStream t, Monad m) => (b -> a -> b) -> b -> t m a -> t m b
694694prescanl' step z m = fromStreamD $ D.prescanl' step z $ toStreamD m
@@ -696,7 +696,7 @@ prescanl' step z m = fromStreamD $ D.prescanl' step z $ toStreamD m
696696-- XXX this needs to be concurrent
697697-- | Like prescanl' but with a monadic step function and a monadic seed.
698698--
699−-- /Internal/
699+-- /Pre-release/
700700{-# INLINE prescanlM' #-}
701701prescanlM' :: (IsStream t, Monad m) => (b -> a -> m b) -> m b -> t m a -> t m b
702702prescanlM' step z m = fromStreamD $ D.prescanlM' step z $ toStreamD m
@@ -737,7 +737,7 @@ scanl1' step m = fromStreamD $ D.scanl1' step $ toStreamD m
737737-- filterWithRelTime = with timeIndexed filter
738738-- @
739739--
740−-- /Internal/
740+-- /Pre-release/
741741{-# INLINE with #-}
742742with :: forall (t :: (Type -> Type) -> Type -> Type) m a b s. Functor (t m) =>
743743 (t m a -> t m (s, a))
@@ -782,7 +782,7 @@ filterM p m = fromStreamD $ D.filterM p $ toStreamD m
782782--
783783-- See also: 'nubBy'.
784784--
785−-- /Internal/
785+-- /Pre-release/
786786--
787787{-# INLINE uniqBy #-}
788788uniqBy :: (IsStream t, Monad m, Functor (t m)) =>
@@ -988,7 +988,7 @@ takeWhileAround = undefined -- fromStreamD $ D.takeWhileAround n $ toStreamD m
988988-- No element is yielded if the duration is zero. At least one element is
989989-- yielded if the duration is non-zero.
990990--
991−-- /Internal/
991+-- /Pre-release/
992992--
993993{-# INLINE takeByTime #-}
994994takeByTime ::(MonadIO m, IsStream t, TimeUnit64 d) => d -> t m a -> t m a
@@ -1021,7 +1021,7 @@ dropWhileM p m = fromStreamD $ D.dropWhileM p $ toStreamD m
10211021--
10221022-- All elements are yielded if the duration is zero.
10231023--
1024−-- /Internal/
1024+-- /Pre-release/
10251025--
10261026{-# INLINE dropByTime #-}
10271027dropByTime ::(MonadIO m, IsStream t, TimeUnit64 d) => d -> t m a -> t m a
@@ -1106,7 +1106,7 @@ intersperse a = fromStreamS . S.intersperse a . toStreamS
11061106-- >>> Stream.drain $ Stream.trace putChar $ Stream.intersperseM_ (putChar '.') $ Stream.fromList "hello"
11071107-- h.e.l.l.o
11081108--
1109−-- /Internal/
1109+-- /Pre-release/
11101110{-# INLINE intersperseM_ #-}
11111111intersperseM_ :: (IsStream t, Monad m) => m b -> t m a -> t m a
11121112intersperseM_ m = fromStreamD . D.intersperseM_ m . toStreamD
@@ -1130,7 +1130,7 @@ intersperseBySpan _n _f _xs = undefined
11301130-- >>> Stream.toList $ Stream.trace putChar $ intersperseSuffix (putChar '.' >> return ',') $ Stream.fromList "hello"
11311131-- h.,e.,l.,l.,o.,"h,e,l,l,o,"
11321132--
1133−-- /Internal/
1133+-- /Pre-release/
11341134{-# INLINE intersperseSuffix #-}
11351135intersperseSuffix :: (IsStream t, MonadAsync m) => m a -> t m a -> t m a
11361136intersperseSuffix m = fromStreamD . D.intersperseSuffix m . toStreamD
@@ -1141,7 +1141,7 @@ intersperseSuffix m = fromStreamD . D.intersperseSuffix m . toStreamD
11411141-- > S.mapM_ putChar $ S.intersperseSuffix_ (threadDelay 1000000) $ S.fromList "hello"
11421142-- @
11431143--
1144−-- /Internal/
1144+-- /Pre-release/
11451145--
11461146{-# INLINE intersperseSuffix_ #-}
11471147intersperseSuffix_ :: (IsStream t, Monad m) => m b -> t m a -> t m a
@@ -1155,7 +1155,7 @@ intersperseSuffix_ m = fromStreamD . D.intersperseSuffix_ m . toStreamD
11551155-- >>> Stream.toList $ Stream.intersperseSuffixBySpan 2 (return ',') $ Stream.fromList "hello"
11561156-- "he,ll,o,"
11571157--
1158−-- /Internal/
1158+-- /Pre-release/
11591159--
11601160{-# INLINE intersperseSuffixBySpan #-}
11611161intersperseSuffixBySpan :: (IsStream t, MonadAsync m)
@@ -1172,7 +1172,7 @@ intersperseSuffixBySpan n eff =
11721172--
11731173-- /Concurrent/
11741174--
1175−-- /Internal/
1175+-- /Pre-release/
11761176--
11771177{-# INLINE interspersePrefix_ #-}
11781178interspersePrefix_ :: (IsStream t, MonadAsync m) => m b -> t m a -> t m a
@@ -1192,7 +1192,7 @@ interspersePrefix_ m = mapM (\x -> void m >> return x)
11921192-- (AbsTime (TimeSpec {sec = ..., nsec = ...}),2)
11931193-- (AbsTime (TimeSpec {sec = ..., nsec = ...}),3)
11941194--
1195−-- /Internal/
1195+-- /Pre-release/
11961196--
11971197{-# INLINE delay #-}
11981198delay :: (IsStream t, MonadIO m) => Double -> t m a -> t m a
@@ -1208,7 +1208,7 @@ delay n = intersperseM_ $ liftIO $ threadDelay $ round $ n * 1000000
12081208-- (AbsTime (TimeSpec {sec = ..., nsec = ...}),2)
12091209-- (AbsTime (TimeSpec {sec = ..., nsec = ...}),3)
12101210--
1211−-- /Internal/
1211+-- /Pre-release/
12121212--
12131213{-# INLINE delayPost #-}
12141214delayPost :: (IsStream t, MonadIO m) => Double -> t m a -> t m a
@@ -1224,7 +1224,7 @@ delayPost n = intersperseSuffix_ $ liftIO $ threadDelay $ round $ n * 1000000
12241224-- (AbsTime (TimeSpec {sec = ..., nsec = ...}),2)
12251225-- (AbsTime (TimeSpec {sec = ..., nsec = ...}),3)
12261226--
1227−-- /Internal/
1227+-- /Pre-release/
12281228--
12291229{-# INLINE delayPre #-}
12301230delayPre :: (IsStream t, MonadIO m) => Double -> t m a -> t m a
@@ -1302,7 +1302,7 @@ indexedR n = fromStreamD . D.indexedR n . toStreamD
13021302-- (AbsTime (TimeSpec {sec = ..., nsec = ...}),2)
13031303-- (AbsTime (TimeSpec {sec = ..., nsec = ...}),3)
13041304--
1305−-- /Internal/
1305+-- /Pre-release/
13061306--
13071307{-# INLINE timestampWith #-}
13081308timestampWith :: (IsStream t, MonadAsync m, Functor (t m))
@@ -1311,7 +1311,7 @@ timestampWith g stream = Z.zipWith (flip (,)) stream (absTimesWith g)
13111311
13121312-- TBD: check performance vs a custom implementation without using zipWith.
13131313--
1314−-- /Internal/
1314+-- /Pre-release/
13151315--
13161316{-# INLINE timestamped #-}
13171317timestamped :: (IsStream t, MonadAsync m, Functor (t m))
@@ -1327,7 +1327,7 @@ timestamped = timestampWith 0.01
13271327-- (RelTime64 (NanoSecond64 ...),2)
13281328-- (RelTime64 (NanoSecond64 ...),3)
13291329--
1330−-- /Internal/
1330+-- /Pre-release/
13311331--
13321332{-# INLINE timeIndexWith #-}
13331333timeIndexWith :: (IsStream t, MonadAsync m, Functor (t m))
@@ -1343,7 +1343,7 @@ timeIndexWith g stream = Z.zipWith (flip (,)) stream (relTimesWith g)
13431343-- (RelTime64 (NanoSecond64 ...),2)
13441344-- (RelTime64 (NanoSecond64 ...),3)
13451345--
1346−-- /Internal/
1346+-- /Pre-release/
13471347--
13481348{-# INLINE timeIndexed #-}
13491349timeIndexed :: (IsStream t, MonadAsync m, Functor (t m))
@@ -1376,7 +1376,7 @@ elemIndices a = findIndices (== a)
13761376--
13771377-- This is the stream equivalent of the list idiom @zipWith f xs (tail xs)@.
13781378--
1379−-- /Internal/
1379+-- /Pre-release/
13801380--
13811381{-# INLINE rollingMap #-}
13821382rollingMap :: (IsStream t, Monad m) => (a -> a -> b) -> t m a -> t m b
@@ -1384,7 +1384,7 @@ rollingMap f m = fromStreamD $ D.rollingMap f $ toStreamD m
13841384
13851385-- | Like 'rollingMap' but with an effectful map function.
13861386--
1387−-- /Internal/
1387+-- /Pre-release/
13881388--
13891389{-# INLINE rollingMapM #-}
13901390rollingMapM :: (IsStream t, Monad m) => (a -> a -> m b) -> t m a -> t m b
@@ -1431,7 +1431,7 @@ mapMaybeMSerial f m = fromStreamD $ D.mapMaybeM f $ toStreamD m
14311431
14321432-- | In a stream of 'Maybe's, discard 'Nothing's and unwrap 'Just's.
14331433--
1434−-- /Internal/
1434+-- /Pre-release/
14351435--
14361436catMaybes :: (IsStream t, Monad m, Functor (t m)) => t m (Maybe a) -> t m a
14371437catMaybes = fmap fromJust . filter isJust
@@ -1442,14 +1442,14 @@ catMaybes = fmap fromJust . filter isJust
14421442
14431443-- | Discard 'Right's and unwrap 'Left's in an 'Either' stream.
14441444--
1445−-- /Internal/
1445+-- /Pre-release/
14461446--
14471447lefts :: (IsStream t, Monad m, Functor (t m)) => t m (Either a b) -> t m a
14481448lefts = fmap (fromLeft undefined) . filter isLeft
14491449
14501450-- | Discard 'Left's and unwrap 'Right's in an 'Either' stream.
14511451--
1452−-- /Internal/
1452+-- /Pre-release/
14531453--
14541454rights :: (IsStream t, Monad m, Functor (t m)) => t m (Either a b) -> t m b
14551455rights = fmap (fromRight undefined) . filter isRight
src/Streamly/Internal/Data/Stream/Parallel.hs+7−7
@@ -278,7 +278,7 @@ parallel = joinStreamVarPar ParallelVar StopNone
278278--
279279-- | Like `parallel` but stops the output as soon as the first stream stops.
280280--
281−-- /Internal/
281+-- /Pre-release/
282282{-# INLINE parallelFst #-}
283283parallelFst :: (IsStream t, MonadAsync m) => t m a -> t m a -> t m a
284284parallelFst = joinStreamVarPar ParallelVar StopBy
@@ -288,7 +288,7 @@ parallelFst = joinStreamVarPar ParallelVar StopBy
288288-- | Like `parallel` but stops the output as soon as any of the two streams
289289-- stops.
290290--
291−-- /Internal/
291+-- /Pre-release/
292292{-# INLINE parallelMin #-}
293293parallelMin :: (IsStream t, MonadAsync m) => t m a -> t m a -> t m a
294294parallelMin = joinStreamVarPar ParallelVar StopAny
@@ -299,7 +299,7 @@ parallelMin = joinStreamVarPar ParallelVar StopAny
299299
300300-- | Like 'mkParallel' but uses StreamK internally.
301301--
302−-- /Internal/
302+-- /Pre-release/
303303--
304304mkParallelK :: (IsStream t, MonadAsync m) => t m a -> t m a
305305mkParallelK m = mkStream $ \st yld sng stp -> do
@@ -345,7 +345,7 @@ mkParallelD m = D.Stream step Nothing
345345--
346346-- @mkParallel = D.fromStreamD . mkParallelD . D.toStreamD@
347347--
348−-- /Internal/
348+-- /Pre-release/
349349--
350350{-# INLINE_NORMAL mkParallel #-}
351351mkParallel :: (K.IsStream t, MonadAsync m) => t m a -> t m a
@@ -395,7 +395,7 @@ mkParallel = D.fromStreamD . mkParallelD . D.toStreamD
395395--
396396-- Compare with 'tap'.
397397--
398−-- /Internal/
398+-- /Pre-release/
399399{-# INLINE tapAsync #-}
400400tapAsync :: (IsStream t, MonadAsync m) => (t m a -> m b) -> t m a -> t m a
401401tapAsync f m = mkStream $ \st yld sng stp -> do
@@ -470,7 +470,7 @@ tapAsyncF f (D.Stream step1 state1) = D.Stream step TapInit
470470-- distributeAsync_ = flip (foldr tapAsync)
471471-- @
472472--
473−-- /Internal/
473+-- /Pre-release/
474474--
475475{-# INLINE distributeAsync_ #-}
476476distributeAsync_ :: (Foldable f, IsStream t, MonadAsync m)
@@ -648,7 +648,7 @@ MONAD_COMMON_INSTANCES(ParallelT, MONADPARALLEL)
648648-- queue values to the stream. The stream is infinite, there is no way for the
649649-- callback to indicate that it is done now.
650650--
651−-- /Internal/
651+-- /Pre-release/
652652--
653653{-# INLINE_NORMAL newCallbackStream #-}
654654newCallbackStream :: (K.IsStream t, MonadAsync m) => m (a -> m (), t m a)
src/Streamly/Internal/Data/Stream/Serial.hs+1−1
@@ -504,7 +504,7 @@ TRAVERSABLE_INSTANCE(WSerialT)
504504-- 3
505505-- @
506506--
507−-- /Internal/
507+-- /Pre-release/
508508--
509509{-# INLINE unfoldrM #-}
510510unfoldrM :: (IsStream t, Monad m) => (b -> m (Maybe (a, b))) -> b -> t m a
src/Streamly/Internal/Data/Stream/StreamD/Exception.hs+2−2
@@ -51,7 +51,7 @@ data GbracketState s1 s2 v
5151--
5252-- /Inhibits stream fusion/
5353--
54−-- /Internal/
54+-- /Pre-release/
5555--
5656{-# INLINE_NORMAL gbracket_ #-}
5757gbracket_
@@ -110,7 +110,7 @@ data GbracketIOState s1 s2 v wref
110110--
111111-- /Inhibits stream fusion/
112112--
113−-- /Internal/
113+-- /Pre-release/
114114{-# INLINE_NORMAL gbracket #-}
115115gbracket
116116 :: (MonadIO m, MonadBaseControl IO m)
src/Streamly/Internal/Data/Stream/StreamK.hs+3−3
@@ -277,14 +277,14 @@ once = yieldM
277277--
278278-- Generate an infinite stream by repeating a monadic value.
279279--
280−-- /Internal/
280+-- /Pre-release/
281281repeatM :: (IsStream t, MonadAsync m) => m a -> t m a
282282repeatM = go
283283 where go m = m |: go m
284284
285285-- Generate an infinite stream by repeating a pure value.
286286--
287−-- /Internal/
287+-- /Pre-release/
288288{-# INLINE repeat #-}
289289repeat :: IsStream t => a -> t m a
290290repeat a = let x = cons a x in x
@@ -568,7 +568,7 @@ tailPartial m = mkStream $ \st yld sng stp ->
568568-- Note that the function @f@ must be lazy in its argument, that's why we use
569569-- 'unsafeInterleaveIO' on @action@ because IO monad is strict.
570570--
571−-- /Internal/
571+-- /Pre-release/
572572
573573mfix :: (IsStream t, Monad m) => (m a -> t m a) -> t m a
574574mfix f = mkStream $ \st yld sng stp ->
src/Streamly/Internal/Data/Stream/StreamK/Type.hs+1−1
@@ -340,7 +340,7 @@ nil = mkStream $ \_ _ _ stp -> stp
340340-- []
341341-- @
342342--
343−-- /Internal/
343+-- /Pre-release/
344344{-# INLINE_NORMAL nilM #-}
345345nilM :: (IsStream t, Monad m) => m b -> t m a
346346nilM m = mkStream $ \_ _ _ stp -> m >> stp
src/Streamly/Internal/Data/Unfold.hs+32−32
@@ -209,7 +209,7 @@ import Prelude
209209-- lmapM f = concat (singletonM f)
210210-- @
211211--
212−-- /Internal/
212+-- /Pre-release/
213213{-# INLINE_NORMAL lmapM #-}
214214lmapM :: Monad m => (a -> m c) -> Unfold m c b -> Unfold m a b
215215lmapM f (Unfold ustep uinject) = Unfold ustep (f >=> uinject)
@@ -219,7 +219,7 @@ lmapM f (Unfold ustep uinject) = Unfold ustep (f >=> uinject)
219219--
220220-- | Supply the seed to an unfold closing the input end of the unfold.
221221--
222−-- /Internal/
222+-- /Pre-release/
223223--
224224{-# INLINE_NORMAL supply #-}
225225supply :: Unfold m a b -> a -> Unfold m Void b
@@ -232,7 +232,7 @@ supply unf a = lmap (Prelude.const a) unf
232232-- as a seed resulting in a fold that accepts the second component of the tuple
233233-- as a seed.
234234--
235−-- /Internal/
235+-- /Pre-release/
236236--
237237{-# INLINE_NORMAL supplyFirst #-}
238238supplyFirst :: Unfold m (a, b) c -> a -> Unfold m b c
@@ -245,7 +245,7 @@ supplyFirst unf a = lmap (a, ) unf
245245-- as a seed resulting in a fold that accepts the first component of the tuple
246246-- as a seed.
247247--
248−-- /Internal/
248+-- /Pre-release/
249249--
250250{-# INLINE_NORMAL supplySecond #-}
251251supplySecond :: Unfold m (a, b) c -> b -> Unfold m a c
@@ -255,7 +255,7 @@ supplySecond unf b = lmap (, b) unf
255255-- using the argument of the original fold as the second element of tuple and
256256-- discarding the first element of the tuple.
257257--
258−-- /Internal/
258+-- /Pre-release/
259259--
260260{-# INLINE_NORMAL discardFirst #-}
261261discardFirst :: Unfold m a b -> Unfold m (c, a) b
@@ -265,7 +265,7 @@ discardFirst = lmap snd
265265-- using the argument of the original fold as the first element of tuple and
266266-- discarding the second element of the tuple.
267267--
268−-- /Internal/
268+-- /Pre-release/
269269--
270270{-# INLINE_NORMAL discardSecond #-}
271271discardSecond :: Unfold m a b -> Unfold m (a, c) b
@@ -274,7 +274,7 @@ discardSecond = lmap fst
274274-- | Convert an 'Unfold' that accepts a tuple as an argument into an unfold
275275-- that accepts a tuple with elements swapped.
276276--
277−-- /Internal/
277+-- /Pre-release/
278278--
279279{-# INLINE_NORMAL swap #-}
280280swap :: Unfold m (a, c) b -> Unfold m (c, a) b
@@ -288,7 +288,7 @@ swap = lmap Tuple.swap
288288-- @Fold m b c@, returns a monadic action @a -> m c@ representing the
289289-- application of the fold on the unfolded stream.
290290--
291−-- /Internal/
291+-- /Pre-release/
292292--
293293{-# INLINE_NORMAL fold #-}
294294fold :: Monad m => Unfold m a b -> Fold m b c -> a -> m c
@@ -374,7 +374,7 @@ fromStreamK = Unfold step return
374374-- | Convert a stream into an 'Unfold'. Note that a stream converted to an
375375-- 'Unfold' may not be as efficient as an 'Unfold' in some situations.
376376--
377−-- /Internal/
377+-- /Pre-release/
378378{-# INLINE_NORMAL fromStream #-}
379379fromStream :: (K.IsStream t, Monad m) => Unfold m (t m a) a
380380fromStream = lmap K.toStream fromStreamK
@@ -395,7 +395,7 @@ nilM f = Unfold step return
395395
396396-- | Prepend a monadic single element generator function to an 'Unfold'.
397397--
398−-- /Internal/
398+-- /Pre-release/
399399{-# INLINE_NORMAL consM #-}
400400consM :: Monad m => (a -> m b) -> Unfold m a b -> Unfold m a b
401401consM action unf = Unfold step inject
@@ -449,7 +449,7 @@ fromListM = Unfold step inject
449449-- The step function returns the next element in the stream and the next seed
450450-- value. When it is done it returns 'Nothing' and the stream ends.
451451--
452−-- /Internal/
452+-- /Pre-release/
453453--
454454{-# INLINE unfoldrM #-}
455455unfoldrM :: Monad m => (a -> m (Maybe (b, a))) -> Unfold m a b
@@ -468,7 +468,7 @@ unfoldrM next = Unfold step return
468468
469469-- | Generates a stream replicating the seed @n@ times.
470470--
471−-- /Internal/
471+-- /Pre-release/
472472--
473473{-# INLINE replicateM #-}
474474replicateM :: Monad m => Int -> Unfold m (m a) a
@@ -488,7 +488,7 @@ replicateM n = Unfold step inject
488488
489489-- | Generates an infinite stream repeating the seed.
490490--
491−-- /Internal/
491+-- /Pre-release/
492492--
493493{-# INLINE repeatM #-}
494494repeatM :: Monad m => Unfold m (m a) a
@@ -500,7 +500,7 @@ repeatM = Unfold step return
500500-- | Generates an infinite stream starting with the given seed and applying the
501501-- given function repeatedly.
502502--
503−-- /Internal/
503+-- /Pre-release/
504504--
505505{-# INLINE iterateM #-}
506506iterateM :: Monad m => (a -> m a) -> Unfold m (m a) a
@@ -514,7 +514,7 @@ iterateM f = Unfold step id
514514-- | @fromIndicesM gen@ generates an infinite stream of values using @gen@
515515-- starting from the seed.
516516--
517−-- /Internal/
517+-- /Pre-release/
518518--
519519{-# INLINE_NORMAL fromIndicesM #-}
520520fromIndicesM :: Monad m => (Int -> m a) -> Unfold m Int a
@@ -583,7 +583,7 @@ filter f = filterM (return . f)
583583
584584-- | @drop n unf@ drops @n@ elements from the stream generated by @unf@.
585585--
586−-- /Internal/
586+-- /Pre-release/
587587--
588588{-# INLINE_NORMAL drop #-}
589589drop :: Monad m => Int -> Unfold m a b -> Unfold m a b
@@ -615,7 +615,7 @@ drop n (Unfold step inject) = Unfold step' inject'
615615-- | @dropWhileM f unf@ drops elements from the stream generated by @unf@ while
616616-- the condition holds true. The condition function @f@ is /monadic/ in nature.
617617--
618−-- /Internal/
618+-- /Pre-release/
619619--
620620{-# INLINE_NORMAL dropWhileM #-}
621621dropWhileM :: Monad m => (b -> m Bool) -> Unfold m a b -> Unfold m a b
@@ -649,7 +649,7 @@ dropWhileM f (Unfold step inject) = Unfold step' inject'
649649
650650-- | Similar to 'dropWhileM' but with a pure condition function.
651651--
652−-- /Internal/
652+-- /Pre-release/
653653--
654654{-# INLINE dropWhile #-}
655655dropWhile :: Monad m => (b -> Bool) -> Unfold m a b -> Unfold m a b
@@ -683,7 +683,7 @@ enumerateFromIntegral = enumerateFromToIntegral maxBound
683683-- | Generate an infinite stream starting from the seed with increments of the
684684-- given stride.
685685--
686−-- /Internal/
686+-- /Pre-release/
687687--
688688{-# INLINE enumerateFromStepNum #-}
689689enumerateFromStepNum :: (Monad m, Num a) => a -> Unfold m a a
@@ -694,7 +694,7 @@ enumerateFromStepNum stride = Unfold step return
694694
695695-- | @numFrom = enumerateFromStepNum 1@
696696--
697−-- /Internal/
697+-- /Pre-release/
698698--
699699{-# INLINE_NORMAL numFrom #-}
700700numFrom :: (Monad m, Num a) => Unfold m a a
@@ -847,7 +847,7 @@ fromProducer = Unfold step (return . FromSVarRead)
847847-- S.mapM_ print $ S.concatUnfold (UF.teeZipWith (,) UF.identity (UF.singleton sqrt)) $ S.fromList [1..10]
848848-- @
849849--
850−-- /Internal/
850+-- /Pre-release/
851851--
852852{-# INLINE_NORMAL teeZipWith #-}
853853teeZipWith :: Monad m
@@ -905,7 +905,7 @@ outerProduct (Unfold step1 inject1) (Unfold step2 inject2) = Unfold step inject
905905--
906906-- /Inhibits stream fusion/
907907--
908−-- /Internal/
908+-- /Pre-release/
909909--
910910{-# INLINE_NORMAL gbracket_ #-}
911911gbracket_
@@ -960,7 +960,7 @@ gbracket_ bef exc aft (Unfold estep einject) (Unfold step1 inject1) =
960960--
961961-- /Inhibits stream fusion/
962962--
963−-- /Internal/
963+-- /Pre-release/
964964{-# INLINE_NORMAL gbracket #-}
965965gbracket
966966 :: (MonadIO m, MonadBaseControl IO m)
@@ -1022,7 +1022,7 @@ _before action = gbracket_ (\x -> action x >> return x) (fmap Right)
10221022-- | Run a side effect @a -> m c@ on the input @a@ before unfolding it using
10231023-- @Unfold m a b@.
10241024--
1025−-- /Internal/
1025+-- /Pre-release/
10261026{-# INLINE_NORMAL before #-}
10271027before :: Monad m => (a -> m c) -> Unfold m a b -> Unfold m a b
10281028before action (Unfold step1 inject1) = Unfold step inject
@@ -1051,7 +1051,7 @@ _after aft = gbracket_ return (fmap Right) aft undefined
10511051-- after partial evaluation.
10521052-- * Monad @m@ does not require any other constraints.
10531053--
1054−-- /Internal/
1054+-- /Pre-release/
10551055{-# INLINE_NORMAL after_ #-}
10561056after_ :: Monad m => (a -> m c) -> Unfold m a b -> Unfold m a b
10571057after_ action (Unfold step1 inject1) = Unfold step inject
@@ -1079,7 +1079,7 @@ after_ action (Unfold step1 inject1) = Unfold step inject
10791079--
10801080-- /See also 'after_'/
10811081--
1082−-- /Internal/
1082+-- /Pre-release/
10831083{-# INLINE_NORMAL after #-}
10841084after :: (MonadIO m, MonadBaseControl IO m)
10851085 => (a -> m c) -> Unfold m a b -> Unfold m a b
@@ -1114,7 +1114,7 @@ _onException action =
11141114--
11151115-- /Inhibits stream fusion/
11161116--
1117−-- /Internal/
1117+-- /Pre-release/
11181118{-# INLINE_NORMAL onException #-}
11191119onException :: MonadCatch m => (a -> m c) -> Unfold m a b -> Unfold m a b
11201120onException action (Unfold step1 inject1) = Unfold step inject
@@ -1147,7 +1147,7 @@ _finally action =
11471147--
11481148-- /Inhibits stream fusion/
11491149--
1150−-- /Internal/
1150+-- /Pre-release/
11511151{-# INLINE_NORMAL finally_ #-}
11521152finally_ :: MonadCatch m => (a -> m c) -> Unfold m a b -> Unfold m a b
11531153finally_ action (Unfold step1 inject1) = Unfold step inject
@@ -1181,7 +1181,7 @@ finally_ action (Unfold step1 inject1) = Unfold step inject
11811181--
11821182-- /Inhibits stream fusion/
11831183--
1184−-- /Internal/
1184+-- /Pre-release/
11851185{-# INLINE_NORMAL finally #-}
11861186finally :: (MonadAsync m, MonadCatch m)
11871187 => (a -> m c) -> Unfold m a b -> Unfold m a b
@@ -1220,7 +1220,7 @@ _bracket bef aft =
12201220--
12211221-- /Inhibits stream fusion/
12221222--
1223−-- /Internal/
1223+-- /Pre-release/
12241224{-# INLINE_NORMAL bracket_ #-}
12251225bracket_ :: MonadCatch m
12261226 => (a -> m c) -> (c -> m d) -> Unfold m c b -> Unfold m a b
@@ -1262,7 +1262,7 @@ bracket_ bef aft (Unfold step1 inject1) = Unfold step inject
12621262--
12631263-- /Inhibits stream fusion/
12641264--
1265−-- /Internal/
1265+-- /Pre-release/
12661266{-# INLINE_NORMAL bracket #-}
12671267bracket :: (MonadAsync m, MonadCatch m)
12681268 => (a -> m c) -> (c -> m d) -> Unfold m c b -> Unfold m a b
@@ -1295,7 +1295,7 @@ bracket bef aft (Unfold step1 inject1) = Unfold step inject
12951295--
12961296-- /Inhibits stream fusion/
12971297--
1298−-- /Internal/
1298+-- /Pre-release/
12991299{-# INLINE_NORMAL handle #-}
13001300handle :: (MonadCatch m, Exception e)
13011301 => Unfold m e b -> Unfold m a b -> Unfold m a b
src/Streamly/Internal/Data/Unfold/Types.hs+4−4
@@ -63,7 +63,7 @@ data Unfold m a b =
6363-- lmap f = concat (singleton f)
6464-- @
6565--
66−-- /Internal/
66+-- /Pre-release/
6767{-# INLINE_NORMAL lmap #-}
6868lmap :: (a -> c) -> Unfold m c b -> Unfold m a b
6969lmap f (Unfold ustep uinject) = Unfold ustep (uinject Prelude.. f)
@@ -74,7 +74,7 @@ lmap f (Unfold ustep uinject) = Unfold ustep (uinject Prelude.. f)
7474
7575-- | Map a function on the output of the unfold (the type @b@).
7676--
77−-- /Internal/
77+-- /Pre-release/
7878{-# INLINE_NORMAL map #-}
7979map :: Functor m => (b -> c) -> Unfold m a b -> Unfold m a c
8080map f (Unfold ustep uinject) = Unfold step uinject
@@ -277,7 +277,7 @@ data ConcatState s1 s2 = ConcatOuter s1 | ConcatInner s1 s2
277277-- | Apply the second unfold to each output element of the first unfold and
278278-- flatten the output in a single stream.
279279--
280−-- /Internal/
280+-- /Pre-release/
281281--
282282{-# INLINE_NORMAL concat #-}
283283concat :: Monad m => Unfold m a b -> Unfold m b c -> Unfold m a c
@@ -357,7 +357,7 @@ zipWithM f (Unfold step1 inject1) (Unfold step2 inject2) = Unfold step inject
357357-- $ S.fromList [1..10]
358358-- @
359359--
360−-- /Internal/
360+-- /Pre-release/
361361--
362362{-# INLINE zipWith #-}
363363zipWith :: Monad m
src/Streamly/Internal/FileSystem/Dir.hs+3−3
@@ -194,7 +194,7 @@ readWithBufferOf = UF.concat readChunksWithBufferOf A.read
194194-- | @toStreamWithBufferOf bufsize handle@ reads a byte stream from a file
195195-- handle, reads are performed in chunks of up to @bufsize@.
196196--
197−-- /Internal/
197+-- /Pre-release/
198198{-# INLINE toStreamWithBufferOf #-}
199199toStreamWithBufferOf :: (IsStream t, MonadIO m) => Int -> Handle -> t m Word8
200200toStreamWithBufferOf chunkSize h = AS.concat $ toChunksWithBufferOf chunkSize h
@@ -252,7 +252,7 @@ readDirs = UF.map (fromLeft undefined) $ UF.filter isLeft readEither
252252
253253-- | Raw read of a directory.
254254--
255−-- /Internal/
255+-- /Pre-release/
256256{-# INLINE toStream #-}
257257toStream :: (IsStream t, MonadIO m) => String -> t m String
258258toStream = S.unfold read
@@ -260,7 +260,7 @@ toStream = S.unfold read
260260-- | Read directories as Left and files as Right. Filter out "." and ".."
261261-- entries.
262262--
263−-- /Internal/
263+-- /Pre-release/
264264{-# INLINE toEither #-}
265265toEither :: (IsStream t, MonadIO m)
266266 => String -> t m (Either String String)
src/Streamly/Internal/FileSystem/Event/Darwin.hs+36−36
@@ -182,7 +182,7 @@ import qualified Streamly.Internal.Data.Array.Foreign as A
182182-- | Watch configuration, used to specify the events of interest and the
183183-- behavior of the watch.
184184--
185−-- /Internal/
185+-- /Pre-release/
186186--
187187data Config = Config
188188 { latency :: Double
@@ -211,7 +211,7 @@ data BatchInfo =
211211--
212212-- /macOS 10.5+/
213213--
214−-- /Internal/
214+-- /Pre-release/
215215--
216216setEventBatching :: BatchInfo -> Config -> Config
217217setEventBatching batchInfo cfg@Config{..} =
@@ -229,7 +229,7 @@ setEventBatching batchInfo cfg@Config{..} =
229229
230230-- | Whether a setting is 'On' or 'Off'.
231231--
232−-- /Internal/
232+-- /Pre-release/
233233--
234234data Toggle = On | Off
235235
@@ -253,7 +253,7 @@ foreign import ccall safe
253253--
254254-- /macOS 10.5+/
255255--
256−-- /Internal/
256+-- /Pre-release/
257257--
258258setRootChanged :: Toggle -> Config -> Config
259259setRootChanged = setFlag kFSEventStreamCreateFlagWatchRoot
@@ -275,7 +275,7 @@ foreign import ccall safe
275275--
276276-- /macOS 10.7+/
277277--
278−-- /Internal/
278+-- /Pre-release/
279279--
280280setFileEvents :: Toggle -> Config -> Config
281281setFileEvents = setFlag kFSEventStreamCreateFlagFileEvents
@@ -291,7 +291,7 @@ foreign import ccall safe
291291--
292292-- /macOS 10.6+/
293293--
294−-- /Internal/
294+-- /Pre-release/
295295--
296296setIgnoreSelf :: Toggle -> Config -> Config
297297setIgnoreSelf = setFlag kFSEventStreamCreateFlagIgnoreSelf
@@ -307,7 +307,7 @@ foreign import ccall safe
307307--
308308-- /macOS 10.15+/
309309--
310−-- /Internal/
310+-- /Pre-release/
311311--
312312setFullHistory :: Toggle -> Config -> Config
313313setFullHistory = setFlag kFSEventStreamCreateFlagFullHistory
@@ -327,7 +327,7 @@ setFullHistory = setFlag kFSEventStreamCreateFlagFullHistory
327327-- * 'setFullHistory' 'Off'
328328#endif
329329--
330−-- /Internal/
330+-- /Pre-release/
331331--
332332defaultConfig :: Config
333333defaultConfig = setFileEvents On $ Config
@@ -390,7 +390,7 @@ data Watch = Watch Handle (Ptr CWatch) (MVar Bool)
390390-- level thread is forked, creating a new watch stream is expensive. It is
391391-- advised to minimize the number of watches.
392392--
393−-- /Internal/
393+-- /Pre-release/
394394--
395395openWatch :: Config -> NonEmpty (Array Word8) -> IO Watch
396396openWatch Config{..} paths = do
@@ -425,7 +425,7 @@ openWatch Config{..} paths = do
425425
426426-- | Close a 'Watch' handle.
427427--
428−-- /Internal/
428+-- /Pre-release/
429429--
430430closeWatch :: Watch -> IO ()
431431closeWatch (Watch h watchPtr mvar) = do
@@ -441,7 +441,7 @@ closeWatch (Watch h watchPtr mvar) = do
441441-- | An Event generated by the file system. Use the accessor functions to
442442-- examine the event.
443443--
444−-- /Internal/
444+-- /Pre-release/
445445--
446446data Event = Event
447447 { eventId :: Word64
@@ -508,7 +508,7 @@ watchToStream (Watch handle _ _) =
508508-- watchTreesWith ('setIgnoreSelf' 'On' . 'setRootChanged' 'On') [Array.fromCString\# "path"#]
509509-- @
510510--
511−-- /Internal/
511+-- /Pre-release/
512512--
513513watchTreesWith ::
514514 (Config -> Config) -> NonEmpty (Array Word8) -> SerialT IO Event
@@ -535,7 +535,7 @@ watchTrees = watchTreesWith id
535535-- | Get the event id of an 'Event'. Event-id is a monotonically increasing
536536-- 64-bit integer identifying an event uniquely.
537537--
538−-- /Internal/
538+-- /Pre-release/
539539--
540540getEventId :: Event -> Word64
541541getEventId Event{..} = eventId
@@ -551,7 +551,7 @@ foreign import ccall safe
551551--
552552-- /macOS 10.5+/
553553--
554−-- /Internal/
554+-- /Pre-release/
555555--
556556isEventIdWrapped :: Event -> Bool
557557isEventIdWrapped = getFlag kFSEventStreamEventFlagEventIdsWrapped
@@ -559,7 +559,7 @@ isEventIdWrapped = getFlag kFSEventStreamEventFlagEventIdsWrapped
559559-- | Get the absolute path of the file system object for which the event is
560560-- generated. The path is a UTF-8 encoded array of bytes.
561561--
562−-- /Internal/
562+-- /Pre-release/
563563--
564564getAbsPath :: Event -> Array Word8
565565getAbsPath Event{..} = eventAbsPath
@@ -591,7 +591,7 @@ foreign import ccall safe
591591--
592592-- /macOS 10.5+/
593593--
594−-- /Internal/
594+-- /Pre-release/
595595--
596596isMustScanSubdirs :: Event -> Bool
597597isMustScanSubdirs = getFlag kFSEventStreamEventFlagMustScanSubDirs
@@ -605,7 +605,7 @@ foreign import ccall safe
605605--
606606-- /macOS 10.5+/
607607--
608−-- /Internal/
608+-- /Pre-release/
609609--
610610isKernelDropped :: Event -> Bool
611611isKernelDropped = getFlag kFSEventStreamEventFlagKernelDropped
@@ -619,7 +619,7 @@ foreign import ccall safe
619619--
620620-- /macOS 10.5+/
621621--
622−-- /Internal/
622+-- /Pre-release/
623623--
624624isUserDropped :: Event -> Bool
625625isUserDropped = getFlag kFSEventStreamEventFlagUserDropped
@@ -639,7 +639,7 @@ foreign import ccall safe
639639--
640640-- /macOS 10.5+/
641641--
642−-- /Internal/
642+-- /Pre-release/
643643--
644644isHistoryDone :: Event -> Bool
645645isHistoryDone = getFlag kFSEventStreamEventFlagHistoryDone
@@ -662,7 +662,7 @@ foreign import ccall safe
662662--
663663-- /macOS 10.5+/
664664--
665−-- /Internal/
665+-- /Pre-release/
666666--
667667isRootChanged :: Event -> Bool
668668isRootChanged = getFlag kFSEventStreamEventFlagRootChanged
@@ -680,7 +680,7 @@ foreign import ccall safe
680680--
681681-- /macOS 10.5+/
682682--
683−-- /Internal/
683+-- /Pre-release/
684684--
685685isMount :: Event -> Bool
686686isMount = getFlag kFSEventStreamEventFlagMount
@@ -694,7 +694,7 @@ foreign import ccall safe
694694--
695695-- /macOS 10.5+/
696696--
697−-- /Internal/
697+-- /Pre-release/
698698--
699699isUnmount :: Event -> Bool
700700isUnmount = getFlag kFSEventStreamEventFlagUnmount
@@ -719,7 +719,7 @@ foreign import ccall safe
719719--
720720-- /macOS 10.7+/
721721--
722−-- /Internal/
722+-- /Pre-release/
723723--
724724isOwnerGroupModeChanged :: Event -> Bool
725725isOwnerGroupModeChanged = getFlag kFSEventStreamEventFlagItemChangeOwner
@@ -740,7 +740,7 @@ foreign import ccall safe
740740--
741741-- /macOS 10.7+/
742742--
743−-- /Internal/
743+-- /Pre-release/
744744--
745745isInodeAttrsChanged :: Event -> Bool
746746isInodeAttrsChanged = getFlag kFSEventStreamEventFlagItemInodeMetaMod
@@ -756,7 +756,7 @@ foreign import ccall safe
756756--
757757-- /macOS 10.7+/
758758--
759−-- /Internal/
759+-- /Pre-release/
760760--
761761isFinderInfoChanged :: Event -> Bool
762762isFinderInfoChanged = getFlag kFSEventStreamEventFlagItemFinderInfoMod
@@ -774,7 +774,7 @@ foreign import ccall safe
774774--
775775-- /macOS 10.7+/
776776--
777−-- /Internal/
777+-- /Pre-release/
778778--
779779isXAttrsChanged :: Event -> Bool
780780isXAttrsChanged = getFlag kFSEventStreamEventFlagItemXattrMod
@@ -808,7 +808,7 @@ foreign import ccall safe
808808--
809809-- /macOS 10.7+/
810810--
811−-- /Internal/
811+-- /Pre-release/
812812--
813813isCreated :: Event -> Bool
814814isCreated = getFlag kFSEventStreamEventFlagItemCreated
@@ -826,7 +826,7 @@ foreign import ccall safe
826826--
827827-- /macOS 10.7+/
828828--
829−-- /Internal/
829+-- /Pre-release/
830830--
831831isDeleted :: Event -> Bool
832832isDeleted = getFlag kFSEventStreamEventFlagItemRemoved
@@ -845,7 +845,7 @@ foreign import ccall safe
845845--
846846-- /macOS 10.7+/
847847--
848−-- /Internal/
848+-- /Pre-release/
849849--
850850isMoved :: Event -> Bool
851851isMoved = getFlag kFSEventStreamEventFlagItemRenamed
@@ -861,7 +861,7 @@ foreign import ccall safe
861861--
862862-- /macOS 10.7+/
863863--
864−-- /Internal/
864+-- /Pre-release/
865865--
866866isModified :: Event -> Bool
867867isModified = getFlag kFSEventStreamEventFlagItemModified
@@ -879,7 +879,7 @@ foreign import ccall safe
879879--
880880-- /macOS 10.13+/
881881--
882−-- /Internal/
882+-- /Pre-release/
883883--
884884isCloned :: Event -> Bool
885885isCloned = getFlag kFSEventStreamEventFlagItemCloned
@@ -899,7 +899,7 @@ foreign import ccall safe
899899--
900900-- /macOS 10.7+/
901901--
902−-- /Internal/
902+-- /Pre-release/
903903--
904904isDir :: Event -> Bool
905905isDir = getFlag kFSEventStreamEventFlagItemIsDir
@@ -914,7 +914,7 @@ foreign import ccall safe
914914--
915915-- /macOS 10.7+/
916916--
917−-- /Internal/
917+-- /Pre-release/
918918--
919919isFile :: Event -> Bool
920920isFile = getFlag kFSEventStreamEventFlagItemIsFile
@@ -929,7 +929,7 @@ foreign import ccall safe
929929--
930930-- /macOS 10.7+/
931931--
932−-- /Internal/
932+-- /Pre-release/
933933--
934934isSymLink :: Event -> Bool
935935isSymLink = getFlag kFSEventStreamEventFlagItemIsSymlink
@@ -949,7 +949,7 @@ foreign import ccall safe
949949--
950950-- /macOS 10.10+/
951951--
952−-- /Internal/
952+-- /Pre-release/
953953--
954954isHardLink :: Event -> Bool
955955isHardLink = getFlag kFSEventStreamEventFlagItemIsHardlink
@@ -967,7 +967,7 @@ foreign import ccall safe
967967--
968968-- /macOS 10.10+/
969969--
970−-- /Internal/
970+-- /Pre-release/
971971--
972972isLastHardLink :: Event -> Bool
973973isLastHardLink = getFlag kFSEventStreamEventFlagItemIsLastHardlink
src/Streamly/Internal/FileSystem/Event/Linux.hs+52−52
@@ -200,7 +200,7 @@ import qualified Streamly.Internal.Unicode.Stream as U
200200-- | Watch configuration, used to specify the events of interest and the
201201-- behavior of the watch.
202202--
203−-- /Internal/
203+-- /Pre-release/
204204--
205205data Config = Config
206206 { watchRec :: Bool
@@ -213,7 +213,7 @@ data Config = Config
213213
214214-- | Whether a setting is 'On' or 'Off'.
215215--
216−-- /Internal/
216+-- /Pre-release/
217217--
218218data Toggle = On | Off
219219
@@ -238,7 +238,7 @@ setFlag mask status cfg@Config{..} =
238238--
239239-- /default: Off/
240240--
241−-- /Internal/
241+-- /Pre-release/
242242--
243243setRecursiveMode :: Bool -> Config -> Config
244244setRecursiveMode rec cfg@Config{} = cfg {watchRec = rec}
@@ -251,7 +251,7 @@ foreign import capi
251251--
252252-- /default: On/
253253--
254−-- /Internal/
254+-- /Pre-release/
255255--
256256setFollowSymLinks :: Toggle -> Config -> Config
257257setFollowSymLinks s = setFlag iN_DONT_FOLLOW (toggle s)
@@ -264,7 +264,7 @@ foreign import capi
264264--
265265-- /default: On/
266266--
267−-- /Internal/
267+-- /Pre-release/
268268--
269269setUnwatchMoved :: Toggle -> Config -> Config
270270setUnwatchMoved = setFlag iN_EXCL_UNLINK
@@ -280,7 +280,7 @@ foreign import capi
280280-- | What to do if a watch already exists when 'openWatch' or 'addToWatch' is
281281-- called for a path.
282282--
283−-- /Internal/
283+-- /Pre-release/
284284--
285285data WhenExists =
286286 AddIfExists -- ^ Do not set an existing setting to 'Off' only set to 'On'
@@ -294,7 +294,7 @@ data WhenExists =
294294--
295295-- /default: FailIfExists/
296296--
297−-- /Internal/
297+-- /Pre-release/
298298--
299299setWhenExists :: WhenExists -> Config -> Config
300300setWhenExists val cfg =
@@ -312,7 +312,7 @@ foreign import capi
312312--
313313-- /default: Off/
314314--
315−-- /Internal/
315+-- /Pre-release/
316316--
317317setOneShot :: Toggle -> Config -> Config
318318setOneShot = setFlag iN_ONESHOT
@@ -325,7 +325,7 @@ foreign import capi
325325--
326326-- /default: Off/
327327--
328−-- /Internal/
328+-- /Pre-release/
329329--
330330setOnlyDir :: Toggle -> Config -> Config
331331setOnlyDir = setFlag iN_ONLYDIR
@@ -341,7 +341,7 @@ foreign import capi
341341--
342342-- /default: On/
343343--
344−-- /Internal/
344+-- /Pre-release/
345345--
346346setRootDeleted :: Toggle -> Config -> Config
347347setRootDeleted = setFlag iN_DELETE_SELF
@@ -353,7 +353,7 @@ foreign import capi
353353--
354354-- /default: On/
355355--
356−-- /Internal/
356+-- /Pre-release/
357357--
358358setRootMoved :: Toggle -> Config -> Config
359359setRootMoved = setFlag iN_MOVE_SELF
@@ -366,7 +366,7 @@ foreign import capi
366366--
367367-- /default: On/
368368--
369−-- /Internal/
369+-- /Pre-release/
370370--
371371setMetadataChanged :: Toggle -> Config -> Config
372372setMetadataChanged = setFlag iN_ATTRIB
@@ -378,7 +378,7 @@ foreign import capi
378378--
379379-- /default: On/
380380--
381−-- /Internal/
381+-- /Pre-release/
382382--
383383setAccessed :: Toggle -> Config -> Config
384384setAccessed = setFlag iN_ACCESS
@@ -390,7 +390,7 @@ foreign import capi
390390--
391391-- /default: On/
392392--
393−-- /Internal/
393+-- /Pre-release/
394394--
395395setOpened :: Toggle -> Config -> Config
396396setOpened = setFlag iN_OPEN
@@ -402,7 +402,7 @@ foreign import capi
402402--
403403-- /default: On/
404404--
405−-- /Internal/
405+-- /Pre-release/
406406--
407407setWriteClosed :: Toggle -> Config -> Config
408408setWriteClosed = setFlag iN_CLOSE_WRITE
@@ -414,7 +414,7 @@ foreign import capi
414414--
415415-- /default: On/
416416--
417−-- /Internal/
417+-- /Pre-release/
418418--
419419setNonWriteClosed :: Toggle -> Config -> Config
420420setNonWriteClosed = setFlag iN_CLOSE_NOWRITE
@@ -426,7 +426,7 @@ foreign import capi
426426--
427427-- /default: On/
428428--
429−-- /Internal/
429+-- /Pre-release/
430430--
431431setCreated :: Toggle -> Config -> Config
432432setCreated = setFlag iN_CREATE
@@ -438,7 +438,7 @@ foreign import capi
438438--
439439-- /default: On/
440440--
441−-- /Internal/
441+-- /Pre-release/
442442--
443443setDeleted :: Toggle -> Config -> Config
444444setDeleted = setFlag iN_DELETE
@@ -450,7 +450,7 @@ foreign import capi
450450--
451451-- /default: On/
452452--
453−-- /Internal/
453+-- /Pre-release/
454454--
455455setMovedFrom :: Toggle -> Config -> Config
456456setMovedFrom = setFlag iN_MOVED_FROM
@@ -462,7 +462,7 @@ foreign import capi
462462--
463463-- /default: On/
464464--
465−-- /Internal/
465+-- /Pre-release/
466466--
467467setMovedTo :: Toggle -> Config -> Config
468468setMovedTo = setFlag iN_MOVED_TO
@@ -474,7 +474,7 @@ foreign import capi
474474--
475475-- /default: On/
476476--
477−-- /Internal/
477+-- /Pre-release/
478478--
479479setModified :: Toggle -> Config -> Config
480480setModified = setFlag iN_MODIFY
@@ -483,7 +483,7 @@ setModified = setFlag iN_MODIFY
483483--
484484-- /default: On/
485485--
486−-- /Internal/
486+-- /Pre-release/
487487--
488488setAllEvents :: Toggle -> Config -> Config
489489setAllEvents s cfg =
@@ -517,7 +517,7 @@ setAllEvents s cfg =
517517-- * 'setWhenExists' 'AddIfExists'
518518-- * 'setAllEvents' 'On'
519519--
520−-- /Internal/
520+-- /Pre-release/
521521--
522522defaultConfig :: Config
523523defaultConfig =
@@ -556,7 +556,7 @@ foreign import ccall unsafe
556556-- | Create a 'Watch' handle. 'addToWatch' can be used to add paths being
557557-- monitored by this watch.
558558--
559−-- /Internal/
559+-- /Pre-release/
560560--
561561createWatch :: IO Watch
562562createWatch = do
@@ -634,7 +634,7 @@ ensureTrailingSlash path =
634634-- being monitored under @root@ via the watch handle @watch@. @root@ must be
635635-- an absolute path and @subpath@ must be relative to @root@.
636636--
637−-- /Internal/
637+-- /Pre-release/
638638--
639639addToWatch :: Config -> Watch -> Array Word8 -> Array Word8 -> IO ()
640640addToWatch cfg@Config{..} watch@(Watch handle wdMap) root0 path0 = do
@@ -698,7 +698,7 @@ foreign import ccall unsafe
698698-- adding you need to provide the original path which was used to add the
699699-- Watch.
700700--
701−-- /Internal/
701+-- /Pre-release/
702702--
703703removeFromWatch :: Watch -> Array Word8 -> IO ()
704704removeFromWatch (Watch handle wdMap) path = do
@@ -722,7 +722,7 @@ removeFromWatch (Watch handle wdMap) path = do
722722-- monitoring the paths for file system events. Returns a 'Watch' handle which
723723-- can then be used to read the event stream or to close the watch.
724724--
725−-- /Internal/
725+-- /Pre-release/
726726--
727727openWatch :: Config -> NonEmpty (Array Word8) -> IO Watch
728728openWatch cfg paths = do
@@ -732,7 +732,7 @@ openWatch cfg paths = do
732732
733733-- | Close a 'Watch' handle.
734734--
735−-- /Internal/
735+-- /Pre-release/
736736--
737737closeWatch :: Watch -> IO ()
738738closeWatch (Watch h _) = hClose h
@@ -746,7 +746,7 @@ newtype Cookie = Cookie Word32 deriving (Show, Eq)
746746-- | An Event generated by the file system. Use the accessor functions to
747747-- examine the event.
748748--
749−-- /Internal/
749+-- /Pre-release/
750750--
751751data Event = Event
752752 { eventWd :: CInt
@@ -856,7 +856,7 @@ watchToStream cfg wt@(Watch handle _) = do
856856-- [Array.fromCString\# "dir"#]
857857-- @
858858--
859−-- /Internal/
859+-- /Pre-release/
860860--
861861watchPathsWith ::
862862 (Config -> Config) -> NonEmpty (Array Word8) -> SerialT IO Event
@@ -868,7 +868,7 @@ watchPathsWith f = watchTreesWith (f . setRecursiveMode False)
868868-- watchPaths = watchPathsWith id
869869-- @
870870--
871−-- /Internal/
871+-- /Pre-release/
872872--
873873watchPaths :: NonEmpty (Array Word8) -> SerialT IO Event
874874watchPaths = watchPathsWith id
@@ -897,7 +897,7 @@ watchPaths = watchPathsWith id
897897--
898898-- See the Linux __inotify__ man page for more details.
899899--
900−-- /Internal/
900+-- /Pre-release/
901901--
902902watchTreesWith ::
903903 (Config -> Config) -> NonEmpty (Array Word8) -> SerialT IO Event
@@ -929,7 +929,7 @@ watchTrees = watchTreesWith id
929929--
930930-- TBD: we can possibly update the watch root on a move self event.
931931--
932−-- /Internal/
932+-- /Pre-release/
933933--
934934getRoot :: Event -> Array Word8
935935getRoot Event{..} =
@@ -946,7 +946,7 @@ getRoot Event{..} =
946946-- | Get the file system object path for which the event is generated, relative
947947-- to the watched root. The path is a "/" separated array of bytes.
948948--
949−-- /Internal/
949+-- /Pre-release/
950950--
951951getRelPath :: Event -> Array Word8
952952getRelPath Event{..} = eventRelPath
@@ -955,7 +955,7 @@ getRelPath Event{..} = eventRelPath
955955-- | Get the absolute file system object path for which the event is generated.
956956-- The path is a "/" separated array of bytes.
957957--
958−-- /Internal/
958+-- /Pre-release/
959959--
960960getAbsPath :: Event -> Array Word8
961961getAbsPath ev = getRoot ev <> getRelPath ev
@@ -965,7 +965,7 @@ getAbsPath ev = getRoot ev <> getRelPath ev
965965-- connect the 'isMovedFrom' and 'isMovedTo' events, if both the events belong
966966-- to the same move operation then they will have the same cookie value.
967967--
968−-- /Internal/
968+-- /Pre-release/
969969--
970970getCookie :: Event -> Cookie
971971getCookie Event{..} = Cookie eventCookie
@@ -993,7 +993,7 @@ foreign import capi
993993-- some events.. The user application must scan everything under the watched
994994-- paths to know the current state.
995995--
996−-- /Internal/
996+-- /Pre-release/
997997--
998998isOverflow :: Event -> Bool
999999isOverflow = getFlag iN_Q_OVERFLOW
@@ -1012,7 +1012,7 @@ foreign import capi
10121012--
10131013-- /Occurs only for a watched path/
10141014--
1015−-- /Internal/
1015+-- /Pre-release/
10161016--
10171017isRootUnwatched :: Event -> Bool
10181018isRootUnwatched = getFlag iN_IGNORED
@@ -1025,7 +1025,7 @@ isRootUnwatched = getFlag iN_IGNORED
10251025--
10261026-- /Occurs only for a watched path/
10271027--
1028−-- /Internal/
1028+-- /Pre-release/
10291029--
10301030isRootDeleted :: Event -> Bool
10311031isRootDeleted = getFlag iN_DELETE_SELF
@@ -1034,7 +1034,7 @@ isRootDeleted = getFlag iN_DELETE_SELF
10341034--
10351035-- /Occurs only for a watched path/
10361036--
1037−-- /Internal/
1037+-- /Pre-release/
10381038--
10391039isRootMoved :: Event -> Bool
10401040isRootMoved = getFlag iN_MOVE_SELF
@@ -1048,7 +1048,7 @@ foreign import capi
10481048--
10491049-- /Occurs only for a watched path/
10501050--
1051−-- /Internal/
1051+-- /Pre-release/
10521052--
10531053isRootUnmounted :: Event -> Bool
10541054isRootUnmounted = getFlag iN_UNMOUNT
@@ -1069,7 +1069,7 @@ isRootUnmounted = getFlag iN_UNMOUNT
10691069--
10701070-- /Can occur for watched path or a file inside it/
10711071--
1072−-- /Internal/
1072+-- /Pre-release/
10731073--
10741074isMetadataChanged :: Event -> Bool
10751075isMetadataChanged = getFlag iN_ATTRIB
@@ -1082,7 +1082,7 @@ isMetadataChanged = getFlag iN_ATTRIB
10821082--
10831083-- /Occurs only for a file inside the watched directory/
10841084--
1085−-- /Internal/
1085+-- /Pre-release/
10861086--
10871087isAccessed :: Event -> Bool
10881088isAccessed = getFlag iN_ACCESS
@@ -1091,7 +1091,7 @@ isAccessed = getFlag iN_ACCESS
10911091--
10921092-- /Occurs only for a file inside the watched directory/
10931093--
1094−-- /Internal/
1094+-- /Pre-release/
10951095--
10961096isOpened :: Event -> Bool
10971097isOpened = getFlag iN_OPEN
@@ -1100,7 +1100,7 @@ isOpened = getFlag iN_OPEN
11001100--
11011101-- /Occurs only for a file inside the watched directory/
11021102--
1103−-- /Internal/
1103+-- /Pre-release/
11041104--
11051105isWriteClosed :: Event -> Bool
11061106isWriteClosed = getFlag iN_CLOSE_WRITE
@@ -1112,7 +1112,7 @@ isWriteClosed = getFlag iN_CLOSE_WRITE
11121112--
11131113-- /Can occur for watched path or a file inside it/
11141114--
1115−-- /Internal/
1115+-- /Pre-release/
11161116--
11171117isNonWriteClosed :: Event -> Bool
11181118isNonWriteClosed = getFlag iN_CLOSE_NOWRITE
@@ -1128,7 +1128,7 @@ isNonWriteClosed = getFlag iN_CLOSE_NOWRITE
11281128--
11291129-- /Occurs only for an object inside the watched directory/
11301130--
1131−-- /Internal/
1131+-- /Pre-release/
11321132--
11331133isCreated :: Event -> Bool
11341134isCreated = getFlag iN_CREATE
@@ -1137,7 +1137,7 @@ isCreated = getFlag iN_CREATE
11371137--
11381138-- /Occurs only for an object inside the watched directory/
11391139--
1140−-- /Internal/
1140+-- /Pre-release/
11411141--
11421142isDeleted :: Event -> Bool
11431143isDeleted = getFlag iN_DELETE
@@ -1150,7 +1150,7 @@ isDeleted = getFlag iN_DELETE
11501150--
11511151-- /Occurs only for an object inside the watched directory/
11521152--
1153−-- /Internal/
1153+-- /Pre-release/
11541154--
11551155isMovedFrom :: Event -> Bool
11561156isMovedFrom = getFlag iN_MOVED_FROM
@@ -1160,7 +1160,7 @@ isMovedFrom = getFlag iN_MOVED_FROM
11601160--
11611161-- /Occurs only for an object inside the watched directory/
11621162--
1163−-- /Internal/
1163+-- /Pre-release/
11641164--
11651165isMovedTo :: Event -> Bool
11661166isMovedTo = getFlag iN_MOVED_TO
@@ -1170,7 +1170,7 @@ isMovedTo = getFlag iN_MOVED_TO
11701170--
11711171-- /Occurs only for an object inside the watched directory/
11721172--
1173−-- /Internal/
1173+-- /Pre-release/
11741174--
11751175isModified :: Event -> Bool
11761176isModified = getFlag iN_MODIFY
@@ -1184,7 +1184,7 @@ foreign import capi
11841184
11851185-- | Determine whether the event is for a directory path.
11861186--
1187−-- /Internal/
1187+-- /Pre-release/
11881188--
11891189isDir :: Event -> Bool
11901190isDir = getFlag iN_ISDIR
src/Streamly/Internal/FileSystem/Event/Windows.hs+23−23
@@ -130,7 +130,7 @@ import Streamly.Internal.Data.Array.Foreign (Array)
130130-- | Watch configuration, used to specify the events of interest and the
131131-- behavior of the watch.
132132--
133−-- /Internal/
133+-- /Pre-release/
134134--
135135data Config = Config
136136 { watchRec :: BOOL
@@ -143,7 +143,7 @@ data Config = Config
143143
144144-- | Whether a setting is 'On' or 'Off'.
145145--
146−-- /Internal/
146+-- /Pre-release/
147147--
148148data Toggle = On | Off
149149
@@ -159,7 +159,7 @@ setFlag mask status cfg@Config{..} =
159159--
160160-- /default: On/
161161--
162−-- /Internal/
162+-- /Pre-release/
163163--
164164setRecursiveMode :: BOOL -> Config -> Config
165165setRecursiveMode rec cfg@Config{} = cfg {watchRec = rec}
@@ -168,7 +168,7 @@ setRecursiveMode rec cfg@Config{} = cfg {watchRec = rec}
168168--
169169-- /default: On/
170170--
171−-- /Internal/
171+-- /Pre-release/
172172--
173173setModifiedFileName :: Toggle -> Config -> Config
174174setModifiedFileName = setFlag fILE_NOTIFY_CHANGE_FILE_NAME
@@ -177,7 +177,7 @@ setModifiedFileName = setFlag fILE_NOTIFY_CHANGE_FILE_NAME
177177--
178178-- /default: On/
179179--
180−-- /Internal/
180+-- /Pre-release/
181181--
182182setModifiedDirName :: Toggle -> Config -> Config
183183setModifiedDirName = setFlag fILE_NOTIFY_CHANGE_DIR_NAME
@@ -186,7 +186,7 @@ setModifiedDirName = setFlag fILE_NOTIFY_CHANGE_DIR_NAME
186186--
187187-- /default: On/
188188--
189−-- /Internal/
189+-- /Pre-release/
190190--
191191setModifiedAttribute :: Toggle -> Config -> Config
192192setModifiedAttribute = setFlag fILE_NOTIFY_CHANGE_ATTRIBUTES
@@ -195,7 +195,7 @@ setModifiedAttribute = setFlag fILE_NOTIFY_CHANGE_ATTRIBUTES
195195--
196196-- /default: On/
197197--
198−-- /Internal/
198+-- /Pre-release/
199199--
200200setModifiedSize :: Toggle -> Config -> Config
201201setModifiedSize = setFlag fILE_NOTIFY_CHANGE_SIZE
@@ -204,7 +204,7 @@ setModifiedSize = setFlag fILE_NOTIFY_CHANGE_SIZE
204204--
205205-- /default: On/
206206--
207−-- /Internal/
207+-- /Pre-release/
208208--
209209setModifiedLastWrite :: Toggle -> Config -> Config
210210setModifiedLastWrite = setFlag fILE_NOTIFY_CHANGE_LAST_WRITE
@@ -213,7 +213,7 @@ setModifiedLastWrite = setFlag fILE_NOTIFY_CHANGE_LAST_WRITE
213213--
214214-- /default: On/
215215--
216−-- /Internal/
216+-- /Pre-release/
217217--
218218setModifiedSecurity :: Toggle -> Config -> Config
219219setModifiedSecurity = setFlag fILE_NOTIFY_CHANGE_SECURITY
@@ -222,7 +222,7 @@ setModifiedSecurity = setFlag fILE_NOTIFY_CHANGE_SECURITY
222222--
223223-- /default: On/
224224--
225−-- /Internal/
225+-- /Pre-release/
226226--
227227setAllEvents :: Toggle -> Config -> Config
228228setAllEvents s =
@@ -394,7 +394,7 @@ utf8ToStringList = NonEmpty.map utf8ToString
394394
395395-- | Close a Directory handle.
396396--
397−-- /Internal/
397+-- /Pre-release/
398398--
399399closePathHandleStream :: SerialT IO (HANDLE, FilePath, Config) -> IO ()
400400closePathHandleStream = S.mapM_ (\(h, _, _) -> closeHandle h)
@@ -406,7 +406,7 @@ closePathHandleStream = S.mapM_ (\(h, _, _) -> closeHandle h)
406406-- contents of subdirectories are not monitored. Monitoring starts from the
407407-- current time onwards.
408408--
409−-- /Internal/
409+-- /Pre-release/
410410--
411411watchPathsWith ::
412412 (Config -> Config)
@@ -420,7 +420,7 @@ watchPathsWith f = watchTreesWith (f . setRecursiveMode False)
420420-- watchPaths = watchPathsWith id
421421-- @
422422--
423−-- /Internal/
423+-- /Pre-release/
424424--
425425watchPaths :: NonEmpty (Array Word8) -> SerialT IO Event
426426watchPaths = watchPathsWith id
@@ -439,7 +439,7 @@ watchPaths = watchPathsWith id
439439-- whole directory tree under it is watched recursively. Monitoring starts from
440440-- the current time onwards.
441441--
442−-- /Internal/
442+-- /Pre-release/
443443--
444444watchTreesWith ::
445445 (Config -> Config)
@@ -485,7 +485,7 @@ getFlag mask Event{..} = eventFlags == mask
485485-- | Get the file system object path for which the event is generated, relative
486486-- to the watched root. The path is a UTF-8 encoded array of bytes.
487487--
488−-- /Internal/
488+-- /Pre-release/
489489--
490490getRelPath :: Event -> String
491491getRelPath Event{..} = eventRelPath
@@ -494,7 +494,7 @@ getRelPath Event{..} = eventRelPath
494494--
495495-- | Get the watch root directory to which this event belongs.
496496--
497−-- /Internal/
497+-- /Pre-release/
498498--
499499getRoot :: Event -> String
500500getRoot Event{..} = ensureTrailingSlash eventRootPath
@@ -504,7 +504,7 @@ getRoot Event{..} = ensureTrailingSlash eventRootPath
504504-- | Get the absolute file system object path for which the event is generated.
505505-- The path is a UTF-8 encoded array of bytes.
506506--
507−-- /Internal/
507+-- /Pre-release/
508508--
509509getAbsPath :: Event -> String
510510getAbsPath ev = getRoot ev <> getRelPath ev
@@ -513,14 +513,14 @@ getAbsPath ev = getRoot ev <> getRelPath ev
513513--
514514-- | File/directory created in watched directory.
515515--
516−-- /Internal/
516+-- /Pre-release/
517517--
518518isCreated :: Event -> Bool
519519isCreated = getFlag fILE_ACTION_ADDED
520520
521521-- | File/directory deleted from watched directory.
522522--
523−-- /Internal/
523+-- /Pre-release/
524524--
525525isDeleted :: Event -> Bool
526526isDeleted = getFlag fILE_ACTION_REMOVED
@@ -528,7 +528,7 @@ isDeleted = getFlag fILE_ACTION_REMOVED
528528-- | Generated for the original path when an object is moved from under a
529529-- monitored directory.
530530--
531−-- /Internal/
531+-- /Pre-release/
532532--
533533isMovedFrom :: Event -> Bool
534534isMovedFrom = getFlag fILE_ACTION_RENAMED_OLD_NAME
@@ -536,7 +536,7 @@ isMovedFrom = getFlag fILE_ACTION_RENAMED_OLD_NAME
536536-- | Generated for the new path when an object is moved under a monitored
537537-- directory.
538538--
539−-- /Internal/
539+-- /Pre-release/
540540--
541541isMovedTo :: Event -> Bool
542542isMovedTo = getFlag fILE_ACTION_RENAMED_NEW_NAME
@@ -546,7 +546,7 @@ isMovedTo = getFlag fILE_ACTION_RENAMED_NEW_NAME
546546-- | Determine whether the event indicates modification of an object within the
547547-- monitored path.
548548--
549−-- /Internal/
549+-- /Pre-release/
550550--
551551isModified :: Event -> Bool
552552isModified = getFlag fILE_ACTION_MODIFIED
@@ -555,7 +555,7 @@ isModified = getFlag fILE_ACTION_MODIFIED
555555-- therefore, events are lost. The user application must scan everything under
556556-- the watched paths to know the current state.
557557--
558−-- /Internal/
558+-- /Pre-release/
559559--
560560isOverflow :: Event -> Bool
561561isOverflow Event{..} = totalBytes == 0
src/Streamly/Internal/FileSystem/File.hs+10−10
@@ -135,7 +135,7 @@ import qualified Streamly.Prelude as S
135135-- this exception will be raised by 'withFile' rather than any exception
136136-- raised by 'act'.
137137--
138−-- /Internal/
138+-- /Pre-release/
139139--
140140{-# INLINE withFile #-}
141141withFile :: (IsStream t, MonadCatch m, MonadAsync m)
@@ -148,7 +148,7 @@ withFile file mode = S.bracket (liftIO $ openFile file mode) (liftIO . hClose)
148148-- or in case of an exception. If closing the handle raises an exception, then
149149-- this exception will be raised by 'usingFile'.
150150--
151−-- /Internal/
151+-- /Pre-release/
152152--
153153{-# INLINABLE usingFile #-}
154154usingFile :: (MonadCatch m, MonadAsync m)
@@ -234,7 +234,7 @@ toChunks = toChunksWithBufferOf defaultChunkSize
234234-- @bufsize@. The size of an array in the resulting stream is always less than
235235-- or equal to @bufsize@.
236236--
237−-- /Internal/
237+-- /Pre-release/
238238--
239239{-# INLINE readChunksWithBufferOf #-}
240240readChunksWithBufferOf :: (MonadCatch m, MonadAsync m)
@@ -247,7 +247,7 @@ readChunksWithBufferOf = usingFile2 FH.readChunksWithBufferOf
247247-- size of arrays in the resulting stream are therefore less than or equal to
248248-- 'Streamly.Internal.Data.Array.Foreign.Types.defaultChunkSize'.
249249--
250−-- /Internal/
250+-- /Pre-release/
251251{-# INLINE readChunks #-}
252252readChunks :: (MonadCatch m, MonadAsync m) => Unfold m FilePath (Array Word8)
253253readChunks = usingFile FH.readChunks
@@ -255,7 +255,7 @@ readChunks = usingFile FH.readChunks
255255-- | Unfolds the tuple @(bufsize, filepath)@ into a byte stream, read requests
256256-- to the IO device are performed using buffers of @bufsize@.
257257--
258−-- /Internal/
258+-- /Pre-release/
259259{-# INLINE readWithBufferOf #-}
260260readWithBufferOf :: (MonadCatch m, MonadAsync m) => Unfold m (Int, FilePath) Word8
261261readWithBufferOf = usingFile2 FH.readWithBufferOf
@@ -273,7 +273,7 @@ read = UF.concat (usingFile FH.readChunks) A.read
273273-- when EOF is encountered. File is locked using multiple reader and single
274274-- writer locking mode.
275275--
276−-- /Internal/
276+-- /Pre-release/
277277--
278278{-# INLINE toBytes #-}
279279toBytes :: (IsStream t, MonadCatch m, MonadAsync m) => FilePath -> t m Word8
@@ -333,7 +333,7 @@ fromBytesWithBufferOf n file xs = fromChunks file $ AS.arraysOf n xs
333333-- truncated to zero size before writing. If the file does not exist it is
334334-- created. File is locked using single writer locking mode.
335335--
336−-- /Internal/
336+-- /Pre-release/
337337{-# INLINE fromBytes #-}
338338fromBytes :: (MonadAsync m, MonadCatch m) => FilePath -> SerialT m Word8 -> m ()
339339fromBytes = fromBytesWithBufferOf defaultChunkSize
@@ -347,7 +347,7 @@ write = toHandleWith A.defaultChunkSize
347347-- | Write a stream of chunks to a handle. Each chunk in the stream is written
348348-- to the device as a separate IO request.
349349--
350−-- /Internal/
350+-- /Pre-release/
351351{-# INLINE writeChunks #-}
352352writeChunks :: (MonadIO m, MonadCatch m, Storable a)
353353 => FilePath -> Fold m (Array a) ()
@@ -372,7 +372,7 @@ writeChunks path = Fold step initial extract
372372-- Bytes in the input stream are collected into a buffer until we have a chunk
373373-- of size @chunkSize@ and then written to the IO device.
374374--
375−-- /Internal/
375+-- /Pre-release/
376376{-# INLINE writeWithBufferOf #-}
377377writeWithBufferOf :: (MonadIO m, MonadCatch m)
378378 => Int -> FilePath -> Fold m Word8 ()
@@ -385,7 +385,7 @@ writeWithBufferOf n path =
385385-- 'Streamly.Internal.Data.Array.Foreign.Types.defaultChunkSize' before writing to
386386-- the IO device.
387387--
388−-- /Internal/
388+-- /Pre-release/
389389--
390390{-# INLINE write #-}
391391write :: (MonadIO m, MonadCatch m) => FilePath -> Fold m Word8 ()
src/Streamly/Internal/FileSystem/Handle.hs+8−8
@@ -237,7 +237,7 @@ toChunks = toChunksWithBufferOf defaultChunkSize
237237--
238238-- > getChunks = toChunks stdin
239239--
240−-- /Internal/
240+-- /Pre-release/
241241--
242242{-# INLINE getChunks #-}
243243getChunks :: (IsStream t, MonadIO m) => t m (Array Word8)
@@ -247,7 +247,7 @@ getChunks = toChunks stdin
247247--
248248-- > getBytes = toBytes stdin
249249--
250−-- /Internal/
250+-- /Pre-release/
251251--
252252{-# INLINE getBytes #-}
253253getBytes :: (IsStream t, MonadIO m) => t m Word8
@@ -283,7 +283,7 @@ readWithBufferOf = UF.concat readChunksWithBufferOf A.read
283283-- | @toBytesWithBufferOf bufsize handle@ reads a byte stream from a file
284284-- handle, reads are performed in chunks of up to @bufsize@.
285285--
286−-- /Internal/
286+-- /Pre-release/
287287{-# INLINE toBytesWithBufferOf #-}
288288toBytesWithBufferOf :: (IsStream t, MonadIO m) => Int -> Handle -> t m Word8
289289toBytesWithBufferOf chunkSize h = AS.concat $ toChunksWithBufferOf chunkSize h
@@ -303,7 +303,7 @@ read = UF.supplyFirst readWithBufferOf defaultChunkSize
303303
304304-- | Generate a byte stream from a file 'Handle'.
305305--
306−-- /Internal/
306+-- /Pre-release/
307307{-# INLINE toBytes #-}
308308toBytes :: (IsStream t, MonadIO m) => Handle -> t m Word8
309309toBytes = AS.concat . toChunks
@@ -347,7 +347,7 @@ fromChunks h = S.mapM_ (liftIO . writeArray h)
347347
348348-- | Write a stream of chunks to standard output.
349349--
350−-- /Internal/
350+-- /Pre-release/
351351--
352352{-# INLINE putChunks #-}
353353putChunks :: (MonadIO m, Storable a) => SerialT m (Array a) -> m ()
@@ -357,7 +357,7 @@ putChunks = fromChunks stdout
357357-- | Write a stream of strings to standard output using the supplied encoding.
358358-- Output is flushed to the device for each string.
359359--
360−-- /Internal/
360+-- /Pre-release/
361361--
362362{-# INLINE putStrings #-}
363363putStrings :: MonadAsync m
@@ -369,7 +369,7 @@ putStrings encode = putChunks . S.mapM (IA.fromStream . encode . S.fromList)
369369-- supplied encoding. Output is line buffered i.e. the output is written to the
370370-- device as soon as a newline is encountered.
371371--
372−-- /Internal/
372+-- /Pre-release/
373373--
374374{-# INLINE putLines #-}
375375putLines :: MonadAsync m
@@ -381,7 +381,7 @@ putLines encode = putChunks . S.mapM
381381--
382382-- > putBytes = fromBytes stdout
383383--
384−-- /Internal/
384+-- /Pre-release/
385385--
386386{-# INLINE putBytes #-}
387387putBytes :: MonadIO m => SerialT m Word8 -> m ()
src/Streamly/Internal/Network/Inet/TCP.hs+7−7
@@ -208,7 +208,7 @@ connectionsOnAddrWith opts addr port =
208208-- | Like 'connections' but binds on the specified IPv4 address of the machine
209209-- and listens for TCP connections on the specified port.
210210--
211−-- /Internal/
211+-- /Pre-release/
212212{-# INLINE connectionsOnAddr #-}
213213connectionsOnAddr
214214 :: MonadAsync m
@@ -223,7 +223,7 @@ connectionsOnAddr = connectionsOnAddrWith []
223223--
224224-- > connectionsOnPort = connectionsOnAddr (0,0,0,0)
225225--
226−-- /Internal/
226+-- /Pre-release/
227227{-# INLINE connectionsOnPort #-}
228228connectionsOnPort :: MonadAsync m => PortNumber -> SerialT m Socket
229229connectionsOnPort = connectionsOnAddr (0,0,0,0)
@@ -234,7 +234,7 @@ connectionsOnPort = connectionsOnAddr (0,0,0,0)
234234--
235235-- > connectionsOnLocalHost = connectionsOnAddr (127,0,0,1)
236236--
237−-- /Internal/
237+-- /Pre-release/
238238{-# INLINE connectionsOnLocalHost #-}
239239connectionsOnLocalHost :: MonadAsync m => PortNumber -> SerialT m Socket
240240connectionsOnLocalHost = connectionsOnAddr (127,0,0,1)
@@ -260,7 +260,7 @@ connect addr port = do
260260-- closing the socket raises an exception, then this exception will be raised
261261-- by 'withConnectionM'.
262262--
263−-- /Internal/
263+-- /Pre-release/
264264{-# INLINABLE withConnectionM #-}
265265withConnectionM :: (MonadMask m, MonadIO m)
266266 => (Word8, Word8, Word8, Word8) -> PortNumber -> (Socket -> m ()) -> m ()
@@ -277,7 +277,7 @@ withConnectionM addr port =
277277-- termination or in case of an exception. If closing the socket raises an
278278-- exception, then this exception will be raised by 'usingConnection'.
279279--
280−-- /Internal/
280+-- /Pre-release/
281281{-# INLINABLE usingConnection #-}
282282usingConnection :: (MonadCatch m, MonadAsync m)
283283 => Unfold m Socket a
@@ -297,7 +297,7 @@ usingConnection =
297297-- handle raises an exception, then this exception will be raised by
298298-- 'withConnection' rather than any exception raised by 'act'.
299299--
300−-- /Internal/
300+-- /Pre-release/
301301{-# INLINABLE withConnection #-}
302302withConnection :: (IsStream t, MonadCatch m, MonadAsync m)
303303 => (Word8, Word8, Word8, Word8) -> PortNumber -> (Socket -> t m a) -> t m a
@@ -444,7 +444,7 @@ withInputConnect addr port input f = S.bracket pre post handler
444444-- the host. The server host just acts as a transformation function on the
445445-- input stream. Both sending and receiving happen asynchronously.
446446--
447−-- /Internal/
447+-- /Pre-release/
448448--
449449{-# INLINABLE transformBytesWith #-}
450450transformBytesWith
src/Streamly/Internal/Network/Socket.hs+4−4
@@ -197,7 +197,7 @@ connectCommon SockSpec{..} local remote = withSocketsDo $ do
197197-- | Connect to a remote host using the given socket specification and remote
198198-- address. Returns a connected socket or throws an exception.
199199--
200−-- /Internal/
200+-- /Pre-release/
201201--
202202{-# INLINE connect #-}
203203connect :: SockSpec -> SockAddr -> IO Socket
@@ -207,7 +207,7 @@ connect spec = connectCommon spec Nothing
207207-- address to bind to and a remote address to connect to. Returns a connected
208208-- socket or throws an exception.
209209--
210−-- /Internal/
210+-- /Pre-release/
211211--
212212{-# INLINE connectFrom #-}
213213connectFrom :: SockSpec -> SockAddr -> SockAddr -> IO Socket
@@ -236,7 +236,7 @@ recvConnectionTuplesWith tcpListenQ spec addr = S.unfoldrM step Nothing
236236-- port). The server generates a stream of connected sockets. The first
237237-- argument is the maximum number of pending connections in the backlog.
238238--
239−-- /Internal/
239+-- /Pre-release/
240240{-# INLINE connections #-}
241241connections :: MonadAsync m => Int -> SockSpec -> SockAddr -> SerialT m Socket
242242connections tcpListenQ spec addr =
@@ -473,7 +473,7 @@ writeChunksWithBufferOf n h = lpackArraysChunksOf n (writeChunks h)
473473-- | Write a stream of strings to a socket in Latin1 encoding. Output is
474474-- flushed to the socket for each string.
475475--
476−-- /Internal/
476+-- /Pre-release/
477477--
478478{-# INLINE writeStrings #-}
479479writeStrings :: MonadIO m
src/Streamly/Internal/Unicode/Char.hs+1−1
@@ -32,7 +32,7 @@ import Data.Char (isAsciiUpper, isAsciiLower)
3232
3333-- | Select alphabetic characters in the ascii character set.
3434--
35−-- /Internal/
35+-- /Pre-release/
3636--
3737{-# INLINE isAsciiAlpha #-}
3838isAsciiAlpha :: Char -> Bool
src/Streamly/Internal/Unicode/Stream.hs+10−10
@@ -683,7 +683,7 @@ decodeUtf8' = D.fromStreamD . decodeUtf8D' . D.toStreamD
683683
684684-- |
685685--
686−-- /Internal/
686+-- /Pre-release/
687687{-# INLINE decodeUtf8Arrays' #-}
688688decodeUtf8Arrays' :: (MonadIO m, IsStream t) => t m (Array Word8) -> t m Char
689689decodeUtf8Arrays' = D.fromStreamD . decodeUtf8ArraysD' . D.toStreamD
@@ -716,7 +716,7 @@ decodeUtf8Lax = decodeUtf8
716716
717717-- |
718718--
719−-- /Internal/
719+-- /Pre-release/
720720{-# INLINE decodeUtf8Either #-}
721721decodeUtf8Either :: (Monad m, IsStream t)
722722 => t m Word8 -> t m (Either DecodeError Char)
@@ -724,7 +724,7 @@ decodeUtf8Either = D.fromStreamD . decodeUtf8EitherD . D.toStreamD
724724
725725-- |
726726--
727−-- /Internal/
727+-- /Pre-release/
728728{-# INLINE resumeDecodeUtf8Either #-}
729729resumeDecodeUtf8Either
730730 :: (Monad m, IsStream t)
@@ -737,7 +737,7 @@ resumeDecodeUtf8Either st cp =
737737
738738-- |
739739--
740−-- /Internal/
740+-- /Pre-release/
741741{-# INLINE decodeUtf8Arrays #-}
742742decodeUtf8Arrays ::
743743 (MonadIO m, IsStream t) => t m (Array Word8) -> t m Char
@@ -746,7 +746,7 @@ decodeUtf8Arrays =
746746
747747-- |
748748--
749−-- /Internal/
749+-- /Pre-release/
750750{-# INLINE decodeUtf8Arrays_ #-}
751751decodeUtf8Arrays_ ::
752752 (MonadIO m, IsStream t) => t m (Array Word8) -> t m Char
@@ -858,7 +858,7 @@ stripEnd = undefined
858858--
859859-- > stripStart = S.dropWhile isSpace
860860--
861−-- /Internal/
861+-- /Pre-release/
862862{-# INLINE stripStart #-}
863863stripStart :: (Monad m, IsStream t) => t m Char -> t m Char
864864stripStart = S.dropWhile isSpace
@@ -871,7 +871,7 @@ stripStart = S.dropWhile isSpace
871871--
872872-- > lines = S.splitOnSuffix (== '\n')
873873--
874−-- /Internal/
874+-- /Pre-release/
875875{-# INLINE lines #-}
876876lines :: (Monad m, IsStream t) => Fold m Char b -> t m Char -> t m b
877877lines = S.splitOnSuffix (== '\n')
@@ -896,7 +896,7 @@ isSpace c
896896--
897897-- > words = S.wordsBy isSpace
898898--
899−-- /Internal/
899+-- /Pre-release/
900900{-# INLINE words #-}
901901words :: (Monad m, IsStream t) => Fold m Char b -> t m Char -> t m b
902902words = S.wordsBy isSpace
@@ -908,7 +908,7 @@ words = S.wordsBy isSpace
908908-- unlines = Stream.interposeSuffix '\n'
909909-- @
910910--
911−-- /Internal/
911+-- /Pre-release/
912912{-# INLINE unlines #-}
913913unlines :: (MonadIO m, IsStream t) => Unfold m a Char -> t m a -> t m Char
914914unlines = S.interposeSuffix '\n'
@@ -921,7 +921,7 @@ unlines = S.interposeSuffix '\n'
921921-- unwords = Stream.interpose ' '
922922-- @
923923--
924−-- /Internal/
924+-- /Pre-release/
925925{-# INLINE unwords #-}
926926unwords :: (MonadIO m, IsStream t) => Unfold m a Char -> t m a -> t m Char
927927unwords = S.interpose ' '