@@ -98,7 +98,7 @@ import Streamly.Internal.Control.Concurrent (MonadAsync)
9898import Streamly.Internal.Data.Fold.Type (Fold(..))
9999import Streamly.Internal.Data.Unfold.Type (Unfold(..))
100100import Streamly.Internal.Data.Array.Foreign.Type (Array(..), writeNUnsafe)
101−import Streamly.Internal.Data.Stream.Serial (SerialT)
101+import Streamly.Internal.Data.Stream.Type (Stream)
102102import Streamly.Internal.Data.Stream.IsStream.Type (IsStream)
103103-- import Streamly.Data.Fold (Fold)
104104-- import Streamly.String (encodeUtf8, decodeUtf8, foldLines)
@@ -324,7 +324,7 @@ readShared = undefined
324324
325325{-# INLINE fromChunksMode #-}
326326fromChunksMode :: (MonadAsync m, MonadCatch m)
327− => IOMode -> FilePath -> SerialT m (Array a) -> m ()
327+ => IOMode -> FilePath -> Stream m (Array a) -> m ()
328328fromChunksMode mode file xs = S.drain $
329329 withFile file mode (\h -> S.mapM (FH.putChunk h) xs)
330330
@@ -333,7 +333,7 @@ fromChunksMode mode file xs = S.drain $
333333-- @since 0.7.0
334334{-# INLINE fromChunks #-}
335335fromChunks :: (MonadAsync m, MonadCatch m)
336− => FilePath -> SerialT m (Array a) -> m ()
336+ => FilePath -> Stream m (Array a) -> m ()
337337fromChunks = fromChunksMode WriteMode
338338
339339-- GHC buffer size dEFAULT_FD_BUFFER_SIZE=8192 bytes.
@@ -351,7 +351,7 @@ fromChunks = fromChunksMode WriteMode
351351-- @since 0.9.0
352352{-# INLINE fromBytesWith #-}
353353fromBytesWith :: (MonadAsync m, MonadCatch m)
354− => Int -> FilePath -> SerialT m Word8 -> m ()
354+ => Int -> FilePath -> Stream m Word8 -> m ()
355355fromBytesWith n file xs = fromChunks file $ AS.arraysOf n xs
356356
357357-- > write = 'writeWith' defaultChunkSize
@@ -363,12 +363,12 @@ fromBytesWith n file xs = fromChunks file $ AS.arraysOf n xs
363363--
364364-- /Pre-release/
365365{-# INLINE fromBytes #-}
366−fromBytes :: (MonadAsync m, MonadCatch m) => FilePath -> SerialT m Word8 -> m ()
366+fromBytes :: (MonadAsync m, MonadCatch m) => FilePath -> Stream m Word8 -> m ()
367367fromBytes = fromBytesWith defaultChunkSize
368368
369369{-
370370{-# INLINE write #-}
371−write :: (MonadIO m, Storable a) => Handle -> SerialT m a -> m ()
371+write :: (MonadIO m, Storable a) => Handle -> Stream m a -> m ()
372372write = toHandleWith A.defaultChunkSize
373373-}
374374
@@ -424,7 +424,7 @@ write = writeWith defaultChunkSize
424424-- @since 0.7.0
425425{-# INLINE appendChunks #-}
426426appendChunks :: (MonadAsync m, MonadCatch m)
427− => FilePath -> SerialT m (Array a) -> m ()
427+ => FilePath -> Stream m (Array a) -> m ()
428428appendChunks = fromChunksMode AppendMode
429429
430430-- | Like 'append' but provides control over the write buffer. Output will
@@ -434,7 +434,7 @@ appendChunks = fromChunksMode AppendMode
434434-- @since 0.9.0
435435{-# INLINE appendWith #-}
436436appendWith :: (MonadAsync m, MonadCatch m)
437− => Int -> FilePath -> SerialT m Word8 -> m ()
437+ => Int -> FilePath -> Stream m Word8 -> m ()
438438appendWith n file xs = appendChunks file $ AS.arraysOf n xs
439439
440440-- | Append a byte stream to a file. Combines the bytes in chunks of size up to
@@ -444,7 +444,7 @@ appendWith n file xs = appendChunks file $ AS.arraysOf n xs
444444--
445445-- @since 0.7.0
446446{-# INLINE append #-}
447−append :: (MonadAsync m, MonadCatch m) => FilePath -> SerialT m Word8 -> m ()
447+append :: (MonadAsync m, MonadCatch m) => FilePath -> Stream m Word8 -> m ()
448448append = appendWith defaultChunkSize
449449
450450{-
@@ -452,7 +452,7 @@ append = appendWith defaultChunkSize
452452--
453453-- @since 0.7.0
454454{-# INLINE appendShared #-}
455−appendShared :: MonadIO m => Handle -> SerialT m Word8 -> m ()
455+appendShared :: MonadIO m => Handle -> Stream m Word8 -> m ()
456456appendShared = undefined
457457-}
458458
@@ -479,7 +479,7 @@ readUtf8 = decodeUtf8 . read
479479--
480480-- @since 0.7.0
481481{-# INLINE writeUtf8 #-}
482−writeUtf8 :: MonadIO m => Handle -> SerialT m Char -> m ()
482+writeUtf8 :: MonadIO m => Handle -> Stream m Char -> m ()
483483writeUtf8 h s = write h $ encodeUtf8 s
484484
485485-- | Write a stream of unicode characters after encoding to UTF-8 in chunks