@@ -56,35 +56,63 @@ module Streamly.Internal.Memory.Array
56 -- Monadic APIs
56 -- Monadic APIs
57 -- , newArray
57 -- , newArray
58 , A.writeN -- drop new
58 , A.writeN -- drop new
59− , A.write -- full buffer
59+ , A.write -- full buffer
60 -- , writeLastN -- drop old (ring buffer)
60 -- , writeLastN -- drop old (ring buffer)
62 -- * Elimination
62 -- * Elimination
63− -- 'GHC.Exts.toList' from "GHC.Exts" can be used to convert an array to a
66 , A.toList
64 , A.toList
67 , toStream
65 , toStream
68 , toStreamRev
66 , toStreamRev
71 -- * Random Access
70 -- * Random Access
76 , readIndex
75 , readIndex
77− , last
76+ -- , readIndices
78− {-
77+ -- , readRanges
80− , readSliceRev
79+ -- , readFrom -- read from a given position to the end of file
81− -}
80+ -- , readFromRev -- read from a given position to the beginning of file
81+ -- , readTo -- read from beginning up to the given position
82+ -- , readToRev -- read from end to the given position in file
86+ -- , readChunksOfFrom
90+ -- , writeFrom -- start writing at the given position
92+ -- , writeTo -- write from beginning up to the given position
97+ -- , writeChunksOfFrom
83 , writeIndex
100 , writeIndex
84− {-
101+ --, writeIndices
85− , writeSlice
102+ --, writeRanges
87− -}
104+ -- -- * Search
111+ -- -- * In-pace mutation (for Mutable Array type)
89 -- * Immutable Transformations
117 -- * Immutable Transformations
90 , streamTransform
118 , streamTransform
@@ -324,7 +352,7 @@ foldbWith level f = undefined
325-- | /O(1)/ Lookup the element at the given index, starting from 0.
353-- | /O(1)/ Lookup the element at the given index, starting from 0.
327−-- @since 0.7.0
355+-- /Internal/
328{-# INLINE readIndex #-}
356{-# INLINE readIndex #-}
329readIndex :: Storable a => Array a -> Int -> Maybe a
357readIndex :: Storable a => Array a -> Int -> Maybe a
330readIndex arr i =
358readIndex arr i =