on master help sign in
Fix some haddock markup and since annotations
8b07153Harendra Kumar
src/Streamly/Internal/Data/Fold.hs+2−2
@@ -389,7 +389,7 @@ transform (Pipe pstep1 pstep2 pinitial) (Fold fstep finitial fextract) =
389-- Drain all input after passing it through a monadic function. This is the
389-- Drain all input after passing it through a monadic function. This is the
390-- dual of mapM_ on stream producers.
390-- dual of mapM_ on stream producers.
391--
391--
392−-- See also: "Streamly.Prelude.mapM_"
392+-- See also: 'Streamly.Prelude.mapM_'
393--
393--
394-- @since 0.7.0
394-- @since 0.7.0
395{-# INLINABLE drainBy #-}
395{-# INLINABLE drainBy #-}
@@ -754,7 +754,7 @@ genericIndex i = mkFold step (Partial 0) (const Nothing)
754
754
755-- | Lookup the element at the given index.
755-- | Lookup the element at the given index.
756--
756--
757−-- See also: "Streamly.Prelude.!!"
757+-- See also: 'Streamly.Prelude.!!'
758--
758--
759-- @since 0.7.0
759-- @since 0.7.0
760{-# INLINABLE index #-}
760{-# INLINABLE index #-}
src/Streamly/Internal/Data/Fold/Type.hs+9−9
@@ -363,7 +363,7 @@ mapMStep f res =
363-- NOTE: The constructor is not yet exposed via exposed modules, smart
363-- NOTE: The constructor is not yet exposed via exposed modules, smart
364-- constructors are provided to create folds. If you think you need the
364-- constructors are provided to create folds. If you think you need the
365-- constructor of this type please consider using the smart constructors in
365-- constructor of this type please consider using the smart constructors in
366−-- "Streamly.Internal.Data.Fold' instead.
366+-- "Streamly.Internal.Data.Fold" instead.
367--
367--
368-- /since 0.8.0 (type changed)/
368-- /since 0.8.0 (type changed)/
369--
369--
@@ -406,7 +406,7 @@ rmapM f (Fold step initial extract) = Fold step1 initial1 (extract >=> f)
406-- mkfoldlx step initial extract = fmap extract (foldl' step initial)
406-- mkfoldlx step initial extract = fmap extract (foldl' step initial)
407-- @
407-- @
408--
408--
409−-- See also: "Streamly.Prelude.foldl'"
409+-- See also: @Streamly.Prelude.foldl'@
410--
410--
411-- @since 0.8.0
411-- @since 0.8.0
412--
412--
@@ -428,7 +428,7 @@ foldl' step initial =
428-- mkFoldlxM step initial extract = rmapM extract (foldlM' step initial)
428-- mkFoldlxM step initial extract = rmapM extract (foldlM' step initial)
429-- @
429-- @
430--
430--
431−-- See also: "Streamly.Prelude.foldlM'"
431+-- See also: @Streamly.Prelude.foldlM'@
432--
432--
433-- @since 0.8.0
433-- @since 0.8.0
434--
434--
@@ -440,7 +440,7 @@ foldlM' step initial =
440-- | Make a strict left fold, for non-empty streams, using first element as the
440-- | Make a strict left fold, for non-empty streams, using first element as the
441-- starting value. Returns Nothing if the stream is empty.
441-- starting value. Returns Nothing if the stream is empty.
442--
442--
443−-- See also: "Streamly.Prelude.foldl1'"
443+-- See also: @Streamly.Prelude.foldl1'@
444--
444--
445-- /Pre-release/
445-- /Pre-release/
446{-# INLINE foldl1' #-}
446{-# INLINE foldl1' #-}
@@ -465,7 +465,7 @@ foldl1' step = fmap toMaybe $ foldl' step1 Nothing'
465--
465--
466-- > toList = foldr (:) []
466-- > toList = foldr (:) []
467--
467--
468−-- See also: "Streamly.Prelude.foldr"
468+-- See also: 'Streamly.Prelude.foldr'
469--
469--
470-- @since 0.8.0
470-- @since 0.8.0
471{-# INLINE foldr #-}
471{-# INLINE foldr #-}
@@ -481,7 +481,7 @@ foldr g z = fmap ($ z) $ foldl' (\f x -> f . g x) id
481--
481--
482-- > toList = foldrM (\a xs -> return $ a : xs) (return [])
482-- > toList = foldrM (\a xs -> return $ a : xs) (return [])
483--
483--
484−-- See also: "Streamly.Prelude.foldrM"
484+-- See also: 'Streamly.Prelude.foldrM'
485--
485--
486-- /Pre-release/
486-- /Pre-release/
487{-# INLINE foldrM #-}
487{-# INLINE foldrM #-}
@@ -851,7 +851,7 @@ data ConcatMapState m sa a c
851--
851--
852-- /Time: O(n^2) where @n@ is the number of compositions./
852-- /Time: O(n^2) where @n@ is the number of compositions./
853--
853--
854−-- See also: "Streamly.Internal.Data.Stream.IsStream.foldIterateM"
854+-- See also: 'Streamly.Internal.Data.Stream.IsStream.foldIterateM'
855--
855--
856-- @since 0.8.0
856-- @since 0.8.0
857--
857--
@@ -1081,7 +1081,7 @@ data ManyState s1 s2
1081--
1081--
1082-- Stops when @collect@ stops.
1082-- Stops when @collect@ stops.
1083--
1083--
1084−-- See also: "Streamly.Prelude.concatMap", "Streamly.Prelude.foldMany"
1084+-- See also: 'Streamly.Prelude.concatMap', 'Streamly.Prelude.foldMany'
1085--
1085--
1086-- @since 0.8.0
1086-- @since 0.8.0
1087--
1087--
@@ -1143,7 +1143,7 @@ many (Fold sstep sinitial sextract) (Fold cstep cinitial cextract) =
1143--
1143--
1144-- /Internal/
1144-- /Internal/
1145--
1145--
1146−-- /See also: Streamly.Prelude.concatMap, Streamly.Prelude.foldMany/
1146+-- /See also: 'Streamly.Prelude.concatMap', 'Streamly.Prelude.foldMany'/
1147--
1147--
1148{-# INLINE manyPost #-}
1148{-# INLINE manyPost #-}
1149manyPost :: Monad m => Fold m a b -> Fold m b c -> Fold m a c
1149manyPost :: 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
543-- kicked off again to evaluate the remaining stream when there is space in the
543-- kicked off again to evaluate the remaining stream when there is space in the
544-- buffer. The consumer consumes the stream lazily from the buffer.
544-- buffer. The consumer consumes the stream lazily from the buffer.
545--
545--
546−-- /Since: 0.8.0/
546+-- /Since: 0.2.0 (Streamly)/
547+--
548+-- @since 0.8.0
547--
549--
548{-# INLINE_NORMAL mkAsync #-}
550{-# INLINE_NORMAL mkAsync #-}
549mkAsync :: (K.IsStream t, MonadAsync m) => t m a -> t m a
551mkAsync :: (K.IsStream t, MonadAsync m) => t m a -> t m a
@@ -997,7 +999,13 @@ wAsync = joinStreamVarAsync WAsyncVar
997--
999--
998-- The @W@ in the name stands for @wide@ or breadth wise scheduling in
1000-- The @W@ in the name stands for @wide@ or breadth wise scheduling in
999-- contrast to the depth wise scheduling behavior of 'AsyncT'.
1001-- contrast to the depth wise scheduling behavior of 'AsyncT'.
1002+--
1003+-- /Since: 0.2.0 ("Streamly")/
1004+--
1005+-- @since 0.8.0
1000
1006
1007+-- XXX This documentation is redundant, need to be cleaned up/removed.
1008+--
1001-- @
1009-- @
1002-- import qualified "Streamly.Prelude" as S
1010-- import qualified "Streamly.Prelude" as S
1003-- import Control.Concurrent
1011-- import Control.Concurrent
@@ -1081,9 +1089,6 @@ wAsync = joinStreamVarAsync WAsyncVar
1081-- ThreadId 38: Delay 3
1089-- ThreadId 38: Delay 3
1082-- @
1090-- @
1083--
1091--
1084−-- /Since: 0.2.0 ("Streamly")/
1085−--
1086−-- @since 0.8.0
1087newtype WAsyncT m a = WAsyncT {getWAsyncT :: Stream m a}
1092newtype WAsyncT m a = WAsyncT {getWAsyncT :: Stream m a}
1088 deriving (MonadTrans)
1093 deriving (MonadTrans)
1089
1094
src/Streamly/Internal/Data/Stream/IsStream/Lift.hs+3−3
@@ -68,7 +68,7 @@ generally xs = fromStreamS $ S.hoist (return . runIdentity) (toStreamS xs)
68-- | Lift the inner monad @m@ of a stream @t m a@ to @tr m@ using the monad
68-- | Lift the inner monad @m@ of a stream @t m a@ to @tr m@ using the monad
69-- transformer @tr@.
69-- transformer @tr@.
70--
70--
71−-- / Internal/
71+-- @since 0.8.0
72--
72--
73{-# INLINE liftInner #-}
73{-# INLINE liftInner #-}
74liftInner :: (Monad m, IsStream t, MonadTrans tr, Monad (tr m))
74liftInner :: (Monad m, IsStream t, MonadTrans tr, Monad (tr m))
@@ -81,7 +81,7 @@ liftInner xs = fromStreamD $ D.liftInner (toStreamD xs)
81
81
82-- | Evaluate the inner monad of a stream as 'ReaderT'.
82-- | Evaluate the inner monad of a stream as 'ReaderT'.
83--
83--
84−-- / Internal/
84+-- @since 0.8.0
85--
85--
86{-# INLINE runReaderT #-}
86{-# INLINE runReaderT #-}
87runReaderT :: (IsStream t, Monad m) => m s -> t (ReaderT s m) a -> t m a
87runReaderT :: (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
146-- This is supported only for 'SerialT' as concurrent state updation may not be
146-- This is supported only for 'SerialT' as concurrent state updation may not be
147-- safe.
147-- safe.
148--
148--
149−-- / Internal/
149+-- @since 0.8.0
150--
150--
151{-# INLINE runStateT #-}
151{-# INLINE runStateT #-}
152runStateT :: Monad m => m s -> SerialT (StateT s m) a -> SerialT m (s, a)
152runStateT :: Monad m => m s -> SerialT (StateT s m) a -> SerialT m (s, a)