@@ -67,7 +67,7 @@ module Streamly.FileSystem.Handle
6767 -- , readArrayUpto
6868 -- , readArrayOf
6969
70− , readArraysOfUpto
70+ , readArraysOf
7171 -- , readArraysOf
7272 , readArrays
7373
@@ -187,13 +187,13 @@ writeArray h Array{..} = withForeignPtr aStart $ \p -> hPutBuf h p aLen
187187-- Stream of Arrays IO
188188-------------------------------------------------------------------------------
189189
190−-- | @readArraysOfUpto size h@ reads a stream of arrays from file handle @h@.
190+-- | @readArraysOf size h@ reads a stream of arrays from file handle @h@.
191191-- The maximum size of a single array is specified by @size@. The actual size
192192-- read may be less than or equal to @size@.
193−{-# INLINABLE _readArraysOfUpto #-}
194−_readArraysOfUpto :: (IsStream t, MonadIO m)
193+{-# INLINABLE _readArraysOf #-}
194+_readArraysOf :: (IsStream t, MonadIO m)
195195 => Int -> Handle -> t m (Array Word8)
196−_readArraysOfUpto size h = go
196+_readArraysOf size h = go
197197 where
198198 -- XXX use cons/nil instead
199199 go = mkStream $ \_ yld _ stp -> do
@@ -202,13 +202,14 @@ _readArraysOfUpto size h = go
202202 then stp
203203 else yld arr go
204204
205−-- | @readArraysOfUpto size handle@ reads a stream of arrays from the file
205+-- | @readArraysOf size handle@ reads a stream of arrays from the file
206206-- handle @handle@. The maximum size of a single array is limited to @size@.
207+-- The actual size read may be less than or equal to @size@.
207208--
208209-- @since 0.7.0
209−{-# INLINE_NORMAL readArraysOfUpto #-}
210−readArraysOfUpto :: (IsStream t, MonadIO m) => Int -> Handle -> t m (Array Word8)
211−readArraysOfUpto size h = D.fromStreamD (D.Stream step ())
210+{-# INLINE_NORMAL readArraysOf #-}
211+readArraysOf :: (IsStream t, MonadIO m) => Int -> Handle -> t m (Array Word8)
212+readArraysOf size h = D.fromStreamD (D.Stream step ())
212213 where
213214 {-# INLINE_LATE step #-}
214215 step _ _ = do
@@ -222,14 +223,15 @@ readArraysOfUpto size h = D.fromStreamD (D.Stream step ())
222223--
223224-- | @readArrays handle@ reads a stream of arrays from the specified file
224225-- handle. The maximum size of a single array is limited to
226+-- @defaultChunkSize@. The actual size read may be less than or equal to
225227-- @defaultChunkSize@.
226228--
227−-- > readArrays = readArraysOfUpto defaultChunkSize
229+-- > readArrays = readArraysOf defaultChunkSize
228230--
229231-- @since 0.7.0
230232{-# INLINE readArrays #-}
231233readArrays :: (IsStream t, MonadIO m) => Handle -> t m (Array Word8)
232−readArrays = readArraysOfUpto defaultChunkSize
234+readArrays = readArraysOf defaultChunkSize
233235
234236-------------------------------------------------------------------------------
235237-- Read File to Stream
@@ -245,7 +247,7 @@ readArrays = readArraysOfUpto defaultChunkSize
245247-- @since 0.7.0
246248{-# INLINE readByChunksUpto #-}
247249readByChunksUpto :: (IsStream t, MonadIO m) => Int -> Handle -> t m Word8
248−readByChunksUpto chunkSize h = AS.flatten $ readArraysOfUpto chunkSize h
250+readByChunksUpto chunkSize h = AS.flatten $ readArraysOf chunkSize h
249251
250252-- TODO
251253-- Generate a stream of elements of the given type from a file 'Handle'.