@@ -41,8 +41,8 @@ module Streamly.Internal.FileSystem.Handle
41 , writeInChunksOf
41 , writeInChunksOf
43 -- Byte stream write (Streams)
43 -- Byte stream write (Streams)
44− , writeS
44+ , fromStream
45− , writeSInChunksOf
45+ , fromStreamInChunksOf
47 -- -- * Array Write
47 -- -- * Array Write
48 , writeArray
48 , writeArray
@@ -50,8 +50,8 @@ module Streamly.Internal.FileSystem.Handle
50 , writeArraysInChunksOf
50 , writeArraysInChunksOf
52 -- -- * Array stream Write
52 -- -- * Array stream Write
53− , writeSArrays
53+ , fromStreamArrays
54− , writeSArraysInChunksOf
54+ , fromStreamArraysInChunksOf
56 -- -- * Random Access (Seek)
56 -- -- * Random Access (Seek)
57 -- -- | Unlike the streaming APIs listed above, these APIs apply to devices or
57 -- -- | Unlike the streaming APIs listed above, these APIs apply to devices or
@@ -244,31 +244,31 @@ writeArray h Array{..} = withForeignPtr aStart $ \p -> hPutBuf h p aLen
244-- | Write a stream of arrays to a handle.
244-- | Write a stream of arrays to a handle.
246-- @since 0.7.0
246-- @since 0.7.0
247−{-# INLINE writeSArrays #-}
247+{-# INLINE fromStreamArrays #-}
248−writeSArrays :: (MonadIO m, Storable a)
248+fromStreamArrays :: (MonadIO m, Storable a)
249 => Handle -> SerialT m (Array a) -> m ()
249 => Handle -> SerialT m (Array a) -> m ()
250−writeSArrays h m = S.mapM_ (liftIO . writeArray h) m
250+fromStreamArrays h m = S.mapM_ (liftIO . writeArray h) m
252−-- | @writeArraysPackedUpto chunkSize handle stream@ writes a stream of arrays
252+-- | @fromStreamArraysInChunksOf chunkSize handle stream@ writes a stream of arrays
253-- to @handle@ after coalescing the adjacent arrays in chunks of @chunkSize@.
253-- to @handle@ after coalescing the adjacent arrays in chunks of @chunkSize@.
254-- The chunk size is only a maximum and the actual writes could be smaller as
254-- The chunk size is only a maximum and the actual writes could be smaller as
255-- we do not split the arrays to fit exactly to the specified size.
255-- we do not split the arrays to fit exactly to the specified size.
257-- @since 0.7.0
257-- @since 0.7.0
258−{-# INLINE writeSArraysInChunksOf #-}
258+{-# INLINE fromStreamArraysInChunksOf #-}
259−writeSArraysInChunksOf :: (MonadIO m, Storable a)
259+fromStreamArraysInChunksOf :: (MonadIO m, Storable a)
260 => Int -> Handle -> SerialT m (Array a) -> m ()
260 => Int -> Handle -> SerialT m (Array a) -> m ()
261−writeSArraysInChunksOf n h xs = writeSArrays h $ AS.compact n xs
261+fromStreamArraysInChunksOf n h xs = fromStreamArrays h $ AS.compact n xs
263−-- | @writeSInChunksOf chunkSize handle stream@ writes @stream@ to @handle@ in
263+-- | @fromStreamInChunksOf chunkSize handle stream@ writes @stream@ to @handle@ in
264-- chunks of @chunkSize@. A write is performed to the IO device as soon as we
264-- chunks of @chunkSize@. A write is performed to the IO device as soon as we
265-- collect the required input size.
265-- collect the required input size.
267-- @since 0.7.0
267-- @since 0.7.0
268−{-# INLINE writeSInChunksOf #-}
268+{-# INLINE fromStreamInChunksOf #-}
269−writeSInChunksOf :: MonadIO m => Int -> Handle -> SerialT m Word8 -> m ()
269+fromStreamInChunksOf :: MonadIO m => Int -> Handle -> SerialT m Word8 -> m ()
270−writeSInChunksOf n h m = writeSArrays h $ S.arraysOf n m
270+fromStreamInChunksOf n h m = fromStreamArrays h $ S.arraysOf n m
271−-- writeSInChunksOf n h m = writeSArrays h $ AS.arraysOf n m
271+-- fromStreamInChunksOf n h m = fromStreamArrays h $ AS.arraysOf n m
273-- > write = 'writeInChunksOf' A.defaultChunkSize
273-- > write = 'writeInChunksOf' A.defaultChunkSize
@@ -279,9 +279,9 @@ writeSInChunksOf n h m = writeSArrays h $ S.arraysOf n m
279-- need some extra perf boost.
279-- need some extra perf boost.
281-- @since 0.7.0
281-- @since 0.7.0
282−{-# INLINE writeS #-}
282+{-# INLINE fromStream #-}
283−writeS :: MonadIO m => Handle -> SerialT m Word8 -> m ()
283+fromStream :: MonadIO m => Handle -> SerialT m Word8 -> m ()
284−writeS = writeSInChunksOf defaultChunkSize
284+fromStream = fromStreamInChunksOf defaultChunkSize
286-- | Write a stream of arrays to a handle.
286-- | Write a stream of arrays to a handle.