@@ -229,7 +229,6 @@ module Streamly.Internal.Data.Fold.Types
232−import Control.Applicative (liftA2)
233import Control.Concurrent (threadDelay, forkIO, killThread)
232import Control.Concurrent (threadDelay, forkIO, killThread)
234import Control.Concurrent.MVar (MVar, newMVar, swapMVar, readMVar)
233import Control.Concurrent.MVar (MVar, newMVar, swapMVar, readMVar)
235import Control.Exception (SomeException(..), catch, mask)
234import Control.Exception (SomeException(..), catch, mask)
@@ -573,26 +572,6 @@ data GenericRunner sL sR bL bR
573 | RunLeft !sL !bR
572 | RunLeft !sL !bR
574 | RunRight !bL !sR
573 | RunRight !bL !sR
576−-- | The fold resulting from '<*>' distributes its input to both the argument
577−-- folds and combines their output using the supplied function.
579−-- __Note:__ The Applicative behaviour will change in the next major release.
581−instance Monad m => Applicative (Fold m a) where
585− -- | __Notice:__ In the next major release the behaviour of @<*>@ for folds
586− -- will be updated from 'teeWith' to 'splitWith' to reflect it's similarity
588− {-# INLINE (<*>) #-}
591−#if MIN_VERSION_base(4,10,0)
592− {-# INLINE liftA2 #-}
593− liftA2 f x = (<*>) (fmap f x)
596-- | @teeWith k f1 f2@ distributes its input to both @f1@ and @f2@ until both
575-- | @teeWith k f1 f2@ distributes its input to both @f1@ and @f2@ until both
597-- of them terminate and combines their output using @k@.
576-- of them terminate and combines their output using @k@.
@@ -746,111 +725,6 @@ concatMap f (Fold stepa initiala extracta) = Fold stepc initialc extractc
746 Partial s -> e s
725 Partial s -> e s
747 Done c -> return c
726 Done c -> return c
749−-- | Combines the outputs of the folds (the type @b@) using their 'Semigroup'
751−instance (Semigroup b, Monad m) => Semigroup (Fold m a b) where
755−-- | Combines the outputs of the folds (the type @b@) using their 'Monoid'
757−instance (Semigroup b, Monoid b, Monad m) => Monoid (Fold m a b) where
758− {-# INLINE mempty #-}
759− mempty = pure mempty
761− {-# INLINE mappend #-}
764−-- | Combines the fold outputs (type @b@) using their 'Num' instances.
765−instance (Monad m, Num b) => Num (Fold m a b) where
766− {-# INLINE fromInteger #-}
767− fromInteger = pure . fromInteger
769− {-# INLINE negate #-}
770− negate = fmap negate
775− {-# INLINE signum #-}
776− signum = fmap signum
787−-- | Combines the fold outputs (type @b@) using their 'Fractional' instances.
788−instance (Monad m, Fractional b) => Fractional (Fold m a b) where
789− {-# INLINE fromRational #-}
790− fromRational = pure . fromRational
792− {-# INLINE recip #-}
798−-- | Combines the fold outputs using their 'Floating' instances.
799−instance (Monad m, Floating b) => Floating (Fold m a b) where
839− {-# INLINE asinh #-}
842− {-# INLINE atanh #-}
845− {-# INLINE acosh #-}
851− {-# INLINE logBase #-}
852− logBase = liftA2 logBase
854------------------------------------------------------------------------------
728------------------------------------------------------------------------------
855-- Internal APIs
729-- Internal APIs
856------------------------------------------------------------------------------
730------------------------------------------------------------------------------