@@ -111,7 +111,7 @@ import Prelude hiding (read)
111111
112112import Streamly.Internal.BaseCompat
113113import Streamly.Internal.Data.Fold (Fold)
114−import Streamly.Internal.Data.Fold.Type (Fold2(..))
114+import Streamly.Internal.Data.Consumer.Type (Consumer(..))
115115import Streamly.Internal.Data.Unfold.Type (Unfold(..))
116116import Streamly.Internal.Data.Array.Foreign.Type
117117 (Array(..), writeNUnsafe, unsafeFreezeWithShrink)
@@ -457,9 +457,9 @@ writeChunks :: (MonadIO m, Storable a) => Handle -> Fold m (Array a) ()
457457writeChunks h = FL.drainBy (putChunk h)
458458
459459{-# INLINE writeChunks2 #-}
460−writeChunks2 :: (MonadIO m, Storable a) => Fold2 m Handle (Array a) ()
460+writeChunks2 :: (MonadIO m, Storable a) => Consumer m Handle (Array a) ()
461461writeChunks2 =
462− Fold2 (\h arr -> liftIO $ putChunk h arr >> return h)
462+ Consumer (\h arr -> liftIO $ putChunk h arr >> return h)
463463 return
464464 (\_ -> return ())
465465
@@ -499,7 +499,7 @@ writeWithBufferOf :: MonadIO m => Int -> Handle -> Fold m Word8 ()
499499writeWithBufferOf n h = FL.chunksOf n (writeNUnsafe n) (writeChunks h)
500500
501501{-# INLINE writeWithBufferOf2 #-}
502−writeWithBufferOf2 :: MonadIO m => Int -> Fold2 m Handle Word8 ()
502+writeWithBufferOf2 :: MonadIO m => Int -> Consumer m Handle Word8 ()
503503writeWithBufferOf2 n = FL.chunksOf2 n (writeNUnsafe n) writeChunks2
504504
505505-- | Write a byte stream to a file handle. Accumulates the input in chunks of
@@ -514,7 +514,7 @@ write :: MonadIO m => Handle -> Fold m Word8 ()
514514write = writeWithBufferOf defaultChunkSize
515515
516516{-# INLINE write2 #-}
517−write2 :: MonadIO m => Fold2 m Handle Word8 ()
517+write2 :: MonadIO m => Consumer m Handle Word8 ()
518518write2 = writeWithBufferOf2 defaultChunkSize
519519
520520{-