@@ -272,6 +272,7 @@ import Data.Maybe (isJust, fromJust)
272272import Fusion.Plugin.Types (Fuse(..))
273273import Streamly.Internal.Data.Maybe.Strict (Maybe'(..), toMaybe)
274274import Streamly.Internal.Data.Tuple.Strict (Tuple'(..), Tuple3'(..))
275+import Streamly.Internal.Data.Consumer.Type (Fold2(..))
275276
276277import qualified Streamly.Internal.Data.Stream.StreamK.Type as K
277278
@@ -570,16 +571,9 @@ mkFoldM_ step initial = mkFoldM step initial return
570571-- Fold2
571572------------------------------------------------------------------------------
572573
573−-- | Experimental type to provide a side input to the fold for generating the
574−-- initial state. For example, if we have to fold chunks of a stream and write
575−-- each chunk to a different file, then we can generate the file name using a
576−-- monadic action. This is a generalized version of 'Fold'.
574+-- This is similar to how we run an Unfold to generate a Stream. A Fold is like
575+-- a Stream and a Fold2 is like an Unfold.
577576--
578−-- /Internal/
579−data Fold2 m c a b =
580− -- | @Fold @ @ step @ @ inject @ @ extract@
581− forall s. Fold2 (s -> a -> m s) (c -> m s) (s -> m b)
582−
583577-- | Convert more general type 'Fold2' into a simpler type 'Fold'
584578--
585579-- /Internal/