@@ -88,22 +88,22 @@ import qualified Network.Socket as Net
8888
8989import Streamly.Internal.Data.Array (Array(..))
9090import Streamly.Internal.Data.Stream.Chunked (lpackArraysChunksOf)
91−import Streamly.Internal.Data.Fold (Fold)
92−import Streamly.Internal.Data.Stream (Stream)
91+import Streamly.Data.Fold (Fold)
92+import Streamly.Data.Stream (Stream)
9393import Streamly.Internal.Data.Unfold (Unfold(..))
9494-- import Streamly.String (encodeUtf8, decodeUtf8, foldLines)
9595import Streamly.Internal.System.IO (defaultChunkSize)
9696
97−import qualified Streamly.Data.Array as A (reader, length)
97+import qualified Streamly.Data.Array as A
9898import qualified Streamly.Data.Fold as FL
99+import qualified Streamly.Data.Stream as S
100+import qualified Streamly.Data.Unfold as UF
99101import qualified Streamly.Internal.Data.Array as A
100− (unsafeFreeze, asPtrUnsafe, byteLength, pinnedChunksOf, pinnedWriteN, pinnedWriteNUnsafe)
102+ ( unsafeFreeze, asPtrUnsafe, byteLength, pinnedChunksOf,
103+ pinnedWriteN, pinnedWriteNUnsafe )
101104import qualified Streamly.Internal.Data.MutArray as MArray
102105 (MutArray(..), asPtrUnsafe, pinnedNewBytes)
103−import qualified Streamly.Internal.Data.Stream as S
104−import qualified Streamly.Internal.Data.Stream as D
105− (Stream(..), Step(..))
106−import qualified Streamly.Data.Unfold as UF
106+import qualified Streamly.Internal.Data.Stream as S (fromStreamK, Stream(..), Step(..))
107107import qualified Streamly.Internal.Data.Unfold as UF (first, map)
108108import qualified Streamly.Internal.Data.StreamK as K (mkStream)
109109
@@ -173,7 +173,7 @@ listenTuples = Unfold step inject
173173
174174 step listener = do
175175 r <- liftIO (Net.accept listener `onException` Net.close listener)
176− return $ D.Yield r listener
176+ return $ S.Yield r listener
177177
178178-- | Unfold a three tuple @(listenQLen, spec, addr)@ into a stream of connected
179179-- protocol sockets corresponding to incoming connections. @listenQLen@ is the
@@ -344,15 +344,15 @@ _readChunksUptoWith f size h = S.fromStreamK go
344344{-# INLINE_NORMAL readChunksWith #-}
345345readChunksWith :: MonadIO m => Int -> Socket -> Stream m (Array Word8)
346346-- readChunksWith = _readChunksUptoWith readChunk
347−readChunksWith size h = D.Stream step ()
347+readChunksWith size h = S.Stream step ()
348348 where
349349 {-# INLINE_LATE step #-}
350350 step _ _ = do
351351 arr <- liftIO $ getChunk size h
352352 return $
353353 case A.length arr of
354− 0 -> D.Stop
355− _ -> D.Yield arr ()
354+ 0 -> S.Stop
355+ _ -> S.Yield arr ()
356356
357357-- | Read a stream of byte arrays from a socket. The maximum size of a single
358358-- array is limited to @defaultChunkSize@.
@@ -378,8 +378,8 @@ chunkReaderWith = Unfold step return
378378 arr <- liftIO $ getChunk size h
379379 return $
380380 case A.length arr of
381− 0 -> D.Stop
382− _ -> D.Yield arr (size, h)
381+ 0 -> S.Stop
382+ _ -> S.Yield arr (size, h)
383383
384384-- | Same as 'chunkReaderWith'
385385--