on master help sign in
Rename getZipStream to unZipStream (#2141)
commitf9e7158727d4f88cc1705a4c56b3718a2ca4d991 authorRanjeet Ranjan <ranjeetr@composewell.com> dateThu 1 Dec 2022, 16:31 (4 years ago) parent001b874
3 files changed+4−4
core/src/Streamly/Internal/Data/List.hs+1−1 core/src/Streamly/Internal/Data/Stream/Zip.hs+2−2 src/Streamly/Internal/Data/Stream/IsStream/Type.hs+1−1
core/src/Streamly/Internal/Data/List.hs+1−1
@@ -161,7 +161,7 @@ instance (a ~ Char) => IsString (ZipList a) where
161161-- | Convert a 'ZipList' to a regular 'List'
162162--
163163fromZipList :: ZipList a -> List a
164−fromZipList (ZipList zs) = List $ CrossStream (getZipStream zs)
164+fromZipList (ZipList zs) = List $ CrossStream (unZipStream zs)
165165
166166-- | Convert a regular 'List' to a 'ZipList'
167167--
core/src/Streamly/Internal/Data/Stream/Zip.hs+2−2
@@ -55,10 +55,10 @@ import qualified Streamly.Internal.Data.Stream as Stream
5555-- >>> s2 = Stream.ZipStream $ Stream.fromFoldable [3, 4]
5656-- >>> s3 = Stream.ZipStream $ Stream.fromFoldable [5, 6]
5757-- >>> s = (,,) <$> s1 <*> s2 <*> s3
58−-- >>> Stream.fold Fold.toList (Stream.getZipStream s)
58+-- >>> Stream.fold Fold.toList (Stream.unZipStream s)
5959-- [(1,3,5),(2,4,6)]
6060--
61−newtype ZipStream m a = ZipStream {getZipStream :: Stream m a}
61+newtype ZipStream m a = ZipStream {unZipStream :: Stream m a}
6262 deriving (Functor, Semigroup, Monoid)
6363
6464deriving instance IsList (ZipStream Identity a)
src/Streamly/Internal/Data/Stream/IsStream/Type.hs+1−1
@@ -585,7 +585,7 @@ consMZip m (Zip.ZipStream r) =
585585fromZipSerial :: IsStream t => ZipSerialM m a -> t m a
586586fromZipSerial = adapt
587587instance IsStream ZipSerialM where
588− toStream = Stream.toStreamK . Zip.getZipStream
588+ toStream = Stream.toStreamK . Zip.unZipStream
589589 fromStream = Zip.ZipStream . Stream.fromStreamK
590590
591591 {-# INLINE consM #-}