on master help sign in
Fix a small naming error in Stream.Zip
ce8fa28Adithya Kumar
core/src/Streamly/Internal/Data/Stream/Zip.hs+9−9
@@ -21,8 +21,8 @@ module Streamly.Internal.Data.Stream.Zip
21 ZipStream (..)
21 ZipStream (..)
22 , ZipSerialM
22 , ZipSerialM
23 , ZipSerial
23 , ZipSerial
24− , zipWithK
24+ , zipWithD
25− , zipWithMK
25+ , zipWithMD
26 )
26 )
27where
27where
28
28
@@ -42,16 +42,16 @@ import qualified Streamly.Internal.Data.Stream.StreamD as D
42-- >>> import qualified Streamly.Data.Stream as Stream
42-- >>> import qualified Streamly.Data.Stream as Stream
43-- >>> import qualified Streamly.Internal.Data.Stream.Zip as Stream
43-- >>> import qualified Streamly.Internal.Data.Stream.Zip as Stream
44
44
45−{-# INLINE zipWithMK #-}
45+{-# INLINE zipWithMD #-}
46−zipWithMK :: Monad m =>
46+zipWithMD :: Monad m =>
47 (a -> b -> m c) -> Stream m a -> Stream m b -> Stream m c
47 (a -> b -> m c) -> Stream m a -> Stream m b -> Stream m c
48−zipWithMK f m1 m2 =
48+zipWithMD f m1 m2 =
49 fromStreamD $ D.zipWithM f (toStreamD m1) (toStreamD m2)
49 fromStreamD $ D.zipWithM f (toStreamD m1) (toStreamD m2)
50
50
51−{-# INLINE zipWithK #-}
51+{-# INLINE zipWithD #-}
52−zipWithK :: Monad m
52+zipWithD :: Monad m
53 => (a -> b -> c) -> Stream m a -> Stream m b -> Stream m c
53 => (a -> b -> c) -> Stream m a -> Stream m b -> Stream m c
54−zipWithK f = zipWithMK (\a b -> return (f a b))
54+zipWithD f = zipWithMD (\a b -> return (f a b))
55
55
56------------------------------------------------------------------------------
56------------------------------------------------------------------------------
57-- Serially Zipping Streams
57-- Serially Zipping Streams
@@ -111,4 +111,4 @@ instance Monad m => Applicative (ZipStream m) where
111 pure = ZipStream . Stream.repeat
111 pure = ZipStream . Stream.repeat
112
112
113 {-# INLINE (<*>) #-}
113 {-# INLINE (<*>) #-}
114− ZipStream m1 <*> ZipStream m2 = ZipStream $ zipWithK id m1 m2
114+ ZipStream m1 <*> ZipStream m2 = ZipStream $ zipWithD id m1 m2