on master help sign in
Refactor writeByChunksOf to writeInChunksOf.
commitaae9b4f85985573077b1b5f31a75f29a44a21ab5 authorPranay Sashank <pranaysashank@gmail.com> dateWed 7 Aug 2019, 00:04 (7 years ago) parent4d85ca3
2 files changed+12−12
src/Streamly/FileSystem/FD.hs+5−5 src/Streamly/FileSystem/Handle.hs+7−7
src/Streamly/FileSystem/FD.hs+5−5
@@ -90,7 +90,7 @@ module Streamly.FileSystem.FD
9090 -- , writeUtf8
9191 -- , writeUtf8Lines
9292 -- , writeFrames
93− , writeByChunksOf
93+ , writeInChunksOf
9494
9595 -- -- * Array Write
9696 -- , writeArray
@@ -399,9 +399,9 @@ _writevArraysPackedUpto n h xs =
399399-- input elements.
400400--
401401-- @since 0.7.0
402−{-# INLINE writeByChunksOf #-}
403−writeByChunksOf :: MonadIO m => Int -> Handle -> SerialT m Word8 -> m ()
404−writeByChunksOf n h m = writeArrays h $ AS.arraysOf n m
402+{-# INLINE writeInChunksOf #-}
403+writeInChunksOf :: MonadIO m => Int -> Handle -> SerialT m Word8 -> m ()
404+writeInChunksOf n h m = writeArrays h $ AS.arraysOf n m
405405
406406-- > write = 'writeByChunks' A.defaultChunkSize
407407--
@@ -412,7 +412,7 @@ writeByChunksOf n h m = writeArrays h $ AS.arraysOf n m
412412-- @since 0.7.0
413413{-# INLINE write #-}
414414write :: MonadIO m => Handle -> SerialT m Word8 -> m ()
415−write = writeByChunksOf defaultChunkSize
415+write = writeInChunksOf defaultChunkSize
416416
417417{-
418418{-# INLINE write #-}
src/Streamly/FileSystem/Handle.hs+7−7
@@ -81,7 +81,7 @@ module Streamly.FileSystem.Handle
8181 -- , writeUtf8
8282 -- , writeUtf8ByLines
8383 -- , writeByFrames
84− , writeByChunksOf
84+ , writeInChunksOf
8585
8686 -- -- * Array Write
8787 , writeArray
@@ -291,16 +291,16 @@ writeArraysPackedUpto n h xs = writeArrays h $ AS.compact n xs
291291-- do not want buffering to occur at GHC level as well. Same thing applies to
292292-- writes as well.
293293
294−-- | @writeByChunksOf chunkSize handle stream@ writes @stream@ to @handle@ in
294+-- | @writeInChunksOf chunkSize handle stream@ writes @stream@ to @handle@ in
295295-- chunks of @chunkSize@. A write is performed to the IO device as soon as we
296296-- collect the required input size.
297297--
298298-- @since 0.7.0
299−{-# INLINE writeByChunksOf #-}
300−writeByChunksOf :: MonadIO m => Int -> Handle -> SerialT m Word8 -> m ()
301−writeByChunksOf n h m = writeArrays h $ AS.arraysOf n m
299+{-# INLINE writeInChunksOf #-}
300+writeInChunksOf :: MonadIO m => Int -> Handle -> SerialT m Word8 -> m ()
301+writeInChunksOf n h m = writeArrays h $ AS.arraysOf n m
302302
303−-- > write = 'writeByChunksOf' A.defaultChunkSize
303+-- > write = 'writeInChunksOf' A.defaultChunkSize
304304--
305305-- | Write a byte stream to a file handle. Combines the bytes in chunks of
306306-- up to 'A.defaultChunkSize' before writing.
@@ -308,7 +308,7 @@ writeByChunksOf n h m = writeArrays h $ AS.arraysOf n m
308308-- @since 0.7.0
309309{-# INLINE write #-}
310310write :: MonadIO m => Handle -> SerialT m Word8 -> m ()
311−write = writeByChunksOf defaultChunkSize
311+write = writeInChunksOf defaultChunkSize
312312
313313{-
314314{-# INLINE write #-}