on master help sign in
Fix some haddock markup and since annotations
commit8b071538e48485b4c342284e41c83daa0247685a authorHarendra Kumar <harendra@composewell.com> dateThu 3 Jun 2021, 00:11 (5 years ago) parent8072636
4 files changed+23−18
src/Streamly/Internal/Data/Fold.hs+2−2 src/Streamly/Internal/Data/Fold/Type.hs+9−9 src/Streamly/Internal/Data/Stream/Async.hs+9−4 src/Streamly/Internal/Data/Stream/IsStream/Lift.hs+3−3
src/Streamly/Internal/Data/Fold.hs+2−2
@@ -389,7 +389,7 @@ transform (Pipe pstep1 pstep2 pinitial) (Fold fstep finitial fextract) =
389389-- Drain all input after passing it through a monadic function. This is the
390390-- dual of mapM_ on stream producers.
391391--
392−-- See also: "Streamly.Prelude.mapM_"
392+-- See also: 'Streamly.Prelude.mapM_'
393393--
394394-- @since 0.7.0
395395{-# INLINABLE drainBy #-}
@@ -754,7 +754,7 @@ genericIndex i = mkFold step (Partial 0) (const Nothing)
754754
755755-- | Lookup the element at the given index.
756756--
757−-- See also: "Streamly.Prelude.!!"
757+-- See also: 'Streamly.Prelude.!!'
758758--
759759-- @since 0.7.0
760760{-# INLINABLE index #-}
src/Streamly/Internal/Data/Fold/Type.hs+9−9
@@ -363,7 +363,7 @@ mapMStep f res =
363363-- NOTE: The constructor is not yet exposed via exposed modules, smart
364364-- constructors are provided to create folds. If you think you need the
365365-- constructor of this type please consider using the smart constructors in
366−-- "Streamly.Internal.Data.Fold' instead.
366+-- "Streamly.Internal.Data.Fold" instead.
367367--
368368-- /since 0.8.0 (type changed)/
369369--
@@ -406,7 +406,7 @@ rmapM f (Fold step initial extract) = Fold step1 initial1 (extract >=> f)
406406-- mkfoldlx step initial extract = fmap extract (foldl' step initial)
407407-- @
408408--
409−-- See also: "Streamly.Prelude.foldl'"
409+-- See also: @Streamly.Prelude.foldl'@
410410--
411411-- @since 0.8.0
412412--
@@ -428,7 +428,7 @@ foldl' step initial =
428428-- mkFoldlxM step initial extract = rmapM extract (foldlM' step initial)
429429-- @
430430--
431−-- See also: "Streamly.Prelude.foldlM'"
431+-- See also: @Streamly.Prelude.foldlM'@
432432--
433433-- @since 0.8.0
434434--
@@ -440,7 +440,7 @@ foldlM' step initial =
440440-- | Make a strict left fold, for non-empty streams, using first element as the
441441-- starting value. Returns Nothing if the stream is empty.
442442--
443−-- See also: "Streamly.Prelude.foldl1'"
443+-- See also: @Streamly.Prelude.foldl1'@
444444--
445445-- /Pre-release/
446446{-# INLINE foldl1' #-}
@@ -465,7 +465,7 @@ foldl1' step = fmap toMaybe $ foldl' step1 Nothing'
465465--
466466-- > toList = foldr (:) []
467467--
468−-- See also: "Streamly.Prelude.foldr"
468+-- See also: 'Streamly.Prelude.foldr'
469469--
470470-- @since 0.8.0
471471{-# INLINE foldr #-}
@@ -481,7 +481,7 @@ foldr g z = fmap ($ z) $ foldl' (\f x -> f . g x) id
481481--
482482-- > toList = foldrM (\a xs -> return $ a : xs) (return [])
483483--
484−-- See also: "Streamly.Prelude.foldrM"
484+-- See also: 'Streamly.Prelude.foldrM'
485485--
486486-- /Pre-release/
487487{-# INLINE foldrM #-}
@@ -851,7 +851,7 @@ data ConcatMapState m sa a c
851851--
852852-- /Time: O(n^2) where @n@ is the number of compositions./
853853--
854−-- See also: "Streamly.Internal.Data.Stream.IsStream.foldIterateM"
854+-- See also: 'Streamly.Internal.Data.Stream.IsStream.foldIterateM'
855855--
856856-- @since 0.8.0
857857--
@@ -1081,7 +1081,7 @@ data ManyState s1 s2
10811081--
10821082-- Stops when @collect@ stops.
10831083--
1084−-- See also: "Streamly.Prelude.concatMap", "Streamly.Prelude.foldMany"
1084+-- See also: 'Streamly.Prelude.concatMap', 'Streamly.Prelude.foldMany'
10851085--
10861086-- @since 0.8.0
10871087--
@@ -1143,7 +1143,7 @@ many (Fold sstep sinitial sextract) (Fold cstep cinitial cextract) =
11431143--
11441144-- /Internal/
11451145--
1146−-- /See also: Streamly.Prelude.concatMap, Streamly.Prelude.foldMany/
1146+-- /See also: 'Streamly.Prelude.concatMap', 'Streamly.Prelude.foldMany'/
11471147--
11481148{-# INLINE manyPost #-}
11491149manyPost :: Monad m => Fold m a b -> Fold m b c -> Fold m a c
src/Streamly/Internal/Data/Stream/Async.hs+9−4
@@ -543,7 +543,9 @@ mkAsyncD m = D.Stream step Nothing
543543-- kicked off again to evaluate the remaining stream when there is space in the
544544-- buffer. The consumer consumes the stream lazily from the buffer.
545545--
546−-- /Since: 0.8.0/
546+-- /Since: 0.2.0 (Streamly)/
547+--
548+-- @since 0.8.0
547549--
548550{-# INLINE_NORMAL mkAsync #-}
549551mkAsync :: (K.IsStream t, MonadAsync m) => t m a -> t m a
@@ -997,7 +999,13 @@ wAsync = joinStreamVarAsync WAsyncVar
997999--
9981000-- The @W@ in the name stands for @wide@ or breadth wise scheduling in
9991001-- contrast to the depth wise scheduling behavior of 'AsyncT'.
1002+--
1003+-- /Since: 0.2.0 ("Streamly")/
1004+--
1005+-- @since 0.8.0
10001006
1007+-- XXX This documentation is redundant, need to be cleaned up/removed.
1008+--
10011009-- @
10021010-- import qualified "Streamly.Prelude" as S
10031011-- import Control.Concurrent
@@ -1081,9 +1089,6 @@ wAsync = joinStreamVarAsync WAsyncVar
10811089-- ThreadId 38: Delay 3
10821090-- @
10831091--
1084−-- /Since: 0.2.0 ("Streamly")/
1085−--
1086−-- @since 0.8.0
10871092newtype WAsyncT m a = WAsyncT {getWAsyncT :: Stream m a}
10881093 deriving (MonadTrans)
10891094
src/Streamly/Internal/Data/Stream/IsStream/Lift.hs+3−3
@@ -68,7 +68,7 @@ generally xs = fromStreamS $ S.hoist (return . runIdentity) (toStreamS xs)
6868-- | Lift the inner monad @m@ of a stream @t m a@ to @tr m@ using the monad
6969-- transformer @tr@.
7070--
71−-- / Internal/
71+-- @since 0.8.0
7272--
7373{-# INLINE liftInner #-}
7474liftInner :: (Monad m, IsStream t, MonadTrans tr, Monad (tr m))
@@ -81,7 +81,7 @@ liftInner xs = fromStreamD $ D.liftInner (toStreamD xs)
8181
8282-- | Evaluate the inner monad of a stream as 'ReaderT'.
8383--
84−-- / Internal/
84+-- @since 0.8.0
8585--
8686{-# INLINE runReaderT #-}
8787runReaderT :: (IsStream t, Monad m) => m s -> t (ReaderT s m) a -> t m a
@@ -146,7 +146,7 @@ usingStateT s f = evalStateT s . f . liftInner
146146-- This is supported only for 'SerialT' as concurrent state updation may not be
147147-- safe.
148148--
149−-- / Internal/
149+-- @since 0.8.0
150150--
151151{-# INLINE runStateT #-}
152152runStateT :: Monad m => m s -> SerialT (StateT s m) a -> SerialT m (s, a)