@@ -64,8 +64,8 @@ module Streamly.Streams
64 , CoparallelT
64 , CoparallelT
65 , AsyncT -- deprecated
65 , AsyncT -- deprecated
66 , ParallelT
66 , ParallelT
67− , ZipStream
67+ , ZipStreamM
68− , ZipParallel
68+ , ZipParallelM
69 , ZipAsync -- deprecated
69 , ZipAsync -- deprecated
71 -- * Type Adapters
71 -- * Type Adapters
@@ -701,7 +701,7 @@ zipWith f m1 m2 = fromStream $ go (toStream m1) (toStream m2)
701 yield1 a ra = merge a ra
701 yield1 a ra = merge a ra
702 (S.runStream mx) Nothing stp single1 yield1
702 (S.runStream mx) Nothing stp single1 yield1
704−-- | The applicative instance of 'ZipStream' zips a number of streams serially
704+-- | The applicative instance of 'ZipStreamM' zips a number of streams serially
705-- i.e. it produces one element from each stream serially and then zips all
705-- i.e. it produces one element from each stream serially and then zips all
706-- those elements.
706-- those elements.
@@ -718,16 +718,16 @@ zipWith f m1 m2 = fromStream $ go (toStream m1) (toStream m2)
718-- The 'Semigroup' instance of this type works the same way as that of
718-- The 'Semigroup' instance of this type works the same way as that of
719-- 'StreamT'.
719-- 'StreamT'.
721−newtype ZipStream m a = ZipStream {getZipStream :: Stream m a}
721+newtype ZipStreamM m a = ZipStreamM {getZipStreamM :: Stream m a}
722 deriving (Functor, Semigroup, Monoid)
722 deriving (Functor, Semigroup, Monoid)
724−instance Monad m => Applicative (ZipStream m) where
724+instance Monad m => Applicative (ZipStreamM m) where
725− pure = ZipStream . S.repeat
725+ pure = ZipStreamM . S.repeat
726 (<*>) = zipWith id
726 (<*>) = zipWith id
728−instance IsStream ZipStream where
728+instance IsStream ZipStreamM where
729− toStream = getZipStream
729+ toStream = getZipStreamM
730− fromStream = ZipStream
730+ fromStream = ZipStreamM
732------------------------------------------------------------------------------
732------------------------------------------------------------------------------
733-- Parallely Zipping Streams
733-- Parallely Zipping Streams
@@ -747,7 +747,7 @@ zipAsyncWith :: (IsStream t, MonadParallel m)
747 => (a -> b -> c) -> t m a -> t m b -> t m c
747 => (a -> b -> c) -> t m a -> t m b -> t m c
748zipAsyncWith = zipParallelWith
748zipAsyncWith = zipParallelWith
750−-- | Like 'ZipStream' but zips in parallel, it generates all the elements to
750+-- | Like 'ZipStreamM' but zips in parallel, it generates all the elements to
751-- be zipped concurrently.
751-- be zipped concurrently.
@@ -763,19 +763,19 @@ zipAsyncWith = zipParallelWith
763-- The 'Semigroup' instance of this type works the same way as that of
763-- The 'Semigroup' instance of this type works the same way as that of
764-- 'StreamT'.
764-- 'StreamT'.
766−newtype ZipParallel m a = ZipParallel {getZipParallel :: Stream m a}
766+newtype ZipParallelM m a = ZipParallelM {getZipParallelM :: Stream m a}
767 deriving (Functor, Semigroup, Monoid)
767 deriving (Functor, Semigroup, Monoid)
769−{-# DEPRECATED ZipAsync "Please use ZipParallel instead." #-}
769+{-# DEPRECATED ZipAsync "Please use ZipParallelM instead." #-}
770−type ZipAsync = ZipParallel
770+type ZipAsync = ZipParallelM
772−instance MonadParallel m => Applicative (ZipParallel m) where
772+instance MonadParallel m => Applicative (ZipParallelM m) where
773− pure = ZipParallel . S.repeat
773+ pure = ZipParallelM . S.repeat
774 (<*>) = zipParallelWith id
774 (<*>) = zipParallelWith id
776−instance IsStream ZipParallel where
776+instance IsStream ZipParallelM where
777− toStream = getZipParallel
777+ toStream = getZipParallelM
778− fromStream = ZipParallel
778+ fromStream = ZipParallelM
780-------------------------------------------------------------------------------
780-------------------------------------------------------------------------------
781-- Type adapting combinators
781-- Type adapting combinators
@@ -811,22 +811,22 @@ asyncly = coparallely
811parallely :: IsStream t => ParallelT m a -> t m a
811parallely :: IsStream t => ParallelT m a -> t m a
812parallely = adapt
812parallely = adapt
814−-- | Fix the type of a polymorphic stream as 'ZipStream'.
814+-- | Fix the type of a polymorphic stream as 'ZipStreamM'.
815−zipStreamly :: IsStream t => ZipStream m a -> t m a
815+zipStreamly :: IsStream t => ZipStreamM m a -> t m a
816zipStreamly = adapt
816zipStreamly = adapt
818-- | Same as 'zipStreamly'.
818-- | Same as 'zipStreamly'.
819{-# DEPRECATED zipping "Please use zipStreamly instead." #-}
819{-# DEPRECATED zipping "Please use zipStreamly instead." #-}
820−zipping :: IsStream t => ZipStream m a -> t m a
820+zipping :: IsStream t => ZipStreamM m a -> t m a
821zipping = zipStreamly
821zipping = zipStreamly
823−-- | Fix the type of a polymorphic stream as 'ZipParallel'.
823+-- | Fix the type of a polymorphic stream as 'ZipParallelM'.
824−zipParallely :: IsStream t => ZipParallel m a -> t m a
824+zipParallely :: IsStream t => ZipParallelM m a -> t m a
825zipParallely = adapt
825zipParallely = adapt
827-- | Same as 'zipParallely'.
827-- | Same as 'zipParallely'.
828{-# DEPRECATED zippingAsync "Please use zipParallely instead." #-}
828{-# DEPRECATED zippingAsync "Please use zipParallely instead." #-}
829−zippingAsync :: IsStream t => ZipParallel m a -> t m a
829+zippingAsync :: IsStream t => ZipParallelM m a -> t m a
830zippingAsync = zipParallely
830zippingAsync = zipParallely
832-------------------------------------------------------------------------------
832-------------------------------------------------------------------------------
@@ -855,12 +855,12 @@ runParallelT = runStream . parallely
856-- | Same as @runStream . zipping@.
856-- | Same as @runStream . zipping@.
857{-# DEPRECATED runZipStream "Please use 'runStream . zipStreamly instead." #-}
857{-# DEPRECATED runZipStream "Please use 'runStream . zipStreamly instead." #-}
858−runZipStream :: Monad m => ZipStream m a -> m ()
858+runZipStream :: Monad m => ZipStreamM m a -> m ()
859runZipStream = runStream . zipStreamly
859runZipStream = runStream . zipStreamly
861-- | Same as @runStream . zippingAsync@.
861-- | Same as @runStream . zippingAsync@.
862{-# DEPRECATED runZipAsync "Please use 'runStream . zipParallely instead." #-}
862{-# DEPRECATED runZipAsync "Please use 'runStream . zipParallely instead." #-}
863−runZipAsync :: Monad m => ZipParallel m a -> m ()
863+runZipAsync :: Monad m => ZipParallelM m a -> m ()
864runZipAsync = runStream . zipParallely
864runZipAsync = runStream . zipParallely
866------------------------------------------------------------------------------
866------------------------------------------------------------------------------