@@ -207,8 +207,8 @@ module Streamly.Internal.Data.Fold.Type
207 , mkFoldM_
207 , mkFoldM_
209 -- * Folds
209 -- * Folds
210− , yield
210+ , fromPure
211− , yieldM
211+ , fromEffect
@@ -616,26 +616,26 @@ instance Functor m => Functor (Fold m a) where
616 step s b = fmap2 f (step1 s b)
616 step s b = fmap2 f (step1 s b)
617 fmap2 g = fmap (fmap g)
617 fmap2 g = fmap (fmap g)
619−-- This is the dual of stream "yield".
619+-- This is the dual of stream "fromPure".
621-- | A fold that always yields a pure value without consuming any input.
621-- | A fold that always yields a pure value without consuming any input.
623-- /Pre-release/
623-- /Pre-release/
625−{-# INLINE yield #-}
625+{-# INLINE fromPure #-}
626−yield :: Applicative m => b -> Fold m a b
626+fromPure :: Applicative m => b -> Fold m a b
627−yield b = Fold undefined (pure $ Done b) pure
627+fromPure b = Fold undefined (pure $ Done b) pure
629−-- This is the dual of stream "yieldM".
629+-- This is the dual of stream "fromEffect".
631-- | A fold that always yields the result of an effectful action without
631-- | A fold that always yields the result of an effectful action without
632-- consuming any input.
632-- consuming any input.
634-- /Pre-release/
634-- /Pre-release/
636−{-# INLINE yieldM #-}
636+{-# INLINE fromEffect #-}
637−yieldM :: Applicative m => m b -> Fold m a b
637+fromEffect :: Applicative m => m b -> Fold m a b
638−yieldM b = Fold undefined (Done <$> b) pure
638+fromEffect b = Fold undefined (Done <$> b) pure
640{-# ANN type Step Fuse #-}
640{-# ANN type Step Fuse #-}
641data SeqFoldState sl f sr = SeqFoldL !sl | SeqFoldR !f !sr
641data SeqFoldState sl f sr = SeqFoldL !sl | SeqFoldR !f !sr
@@ -1030,9 +1030,9 @@ duplicate (Fold step1 initial1 extract1) =
1033− initial = second yield <$> initial1
1033+ initial = second fromPure <$> initial1
1035− step s a = second yield <$> step1 s a
1035+ step s a = second fromPure <$> step1 s a
1037-- | Run the initialization effect of a fold. The returned fold would use the
1037-- | Run the initialization effect of a fold. The returned fold would use the
1038-- value returned by this effect as its initial value.
1038-- value returned by this effect as its initial value.