@@ -11,6 +11,7 @@
1111--
1212module Streamly.Internal.Data.Fold.Tee
1313 ( Tee(..)
14+ , toFold
1415 )
1516where
1617
@@ -24,9 +25,13 @@ import qualified Streamly.Internal.Data.Fold.Type as Fold
2425-- instances.
2526--
2627newtype Tee m a b =
27− Tee { toFold :: Fold m a b }
28+ Tee { unTee :: Fold m a b }
2829 deriving (Functor)
2930
31+{-# DEPRECATED toFold "Please use 'unTee' instead." #-}
32+toFold :: Tee m a b -> Fold m a b
33+toFold = unTee
34+
3035-- | '<*>' distributes the input to both the argument 'Tee's and combines their
3136-- outputs using function application.
3237--
@@ -36,7 +41,7 @@ instance Monad m => Applicative (Tee m a) where
3641 pure a = Tee (Fold.fromPure a)
3742
3843 {-# INLINE (<*>) #-}
39− (<*>) a b = Tee (Fold.teeWith ($) (toFold a) (toFold b))
44+ (<*>) a b = Tee (Fold.teeWith ($) (unTee a) (unTee b))
4045
4146-- | '<>' distributes the input to both the argument 'Tee's and combines their
4247-- outputs using the 'Semigroup' instance of the output type.