on master help sign in
Rename getZipStream to unZipStream (#2141)
f9e7158Ranjeet Ranjan
core/src/Streamly/Internal/Data/List.hs+1−1
@@ -161,7 +161,7 @@ instance (a ~ Char) => IsString (ZipList a) where
161-- | Convert a 'ZipList' to a regular 'List'
161-- | Convert a 'ZipList' to a regular 'List'
162--
162--
163fromZipList :: ZipList a -> List a
163fromZipList :: ZipList a -> List a
164−fromZipList (ZipList zs) = List $ CrossStream (getZipStream zs)
164+fromZipList (ZipList zs) = List $ CrossStream (unZipStream zs)
165
165
166-- | Convert a regular 'List' to a 'ZipList'
166-- | Convert a regular 'List' to a 'ZipList'
167--
167--
core/src/Streamly/Internal/Data/Stream/Zip.hs+2−2
@@ -55,10 +55,10 @@ import qualified Streamly.Internal.Data.Stream as Stream
55-- >>> s2 = Stream.ZipStream $ Stream.fromFoldable [3, 4]
55-- >>> s2 = Stream.ZipStream $ Stream.fromFoldable [3, 4]
56-- >>> s3 = Stream.ZipStream $ Stream.fromFoldable [5, 6]
56-- >>> s3 = Stream.ZipStream $ Stream.fromFoldable [5, 6]
57-- >>> s = (,,) <$> s1 <*> s2 <*> s3
57-- >>> s = (,,) <$> s1 <*> s2 <*> s3
58−-- >>> Stream.fold Fold.toList (Stream.getZipStream s)
58+-- >>> Stream.fold Fold.toList (Stream.unZipStream s)
59-- [(1,3,5),(2,4,6)]
59-- [(1,3,5),(2,4,6)]
60--
60--
61−newtype ZipStream m a = ZipStream {getZipStream :: Stream m a}
61+newtype ZipStream m a = ZipStream {unZipStream :: Stream m a}
62 deriving (Functor, Semigroup, Monoid)
62 deriving (Functor, Semigroup, Monoid)
63
63
64deriving instance IsList (ZipStream Identity a)
64deriving instance IsList (ZipStream Identity a)
src/Streamly/Internal/Data/Stream/IsStream/Type.hs+1−1
@@ -585,7 +585,7 @@ consMZip m (Zip.ZipStream r) =
585fromZipSerial :: IsStream t => ZipSerialM m a -> t m a
585fromZipSerial :: IsStream t => ZipSerialM m a -> t m a
586fromZipSerial = adapt
586fromZipSerial = adapt
587instance IsStream ZipSerialM where
587instance IsStream ZipSerialM where
588− toStream = Stream.toStreamK . Zip.getZipStream
588+ toStream = Stream.toStreamK . Zip.unZipStream
589 fromStream = Zip.ZipStream . Stream.fromStreamK
589 fromStream = Zip.ZipStream . Stream.fromStreamK
590
590
591 {-# INLINE consM #-}
591 {-# INLINE consM #-}