@@ -93,21 +93,6 @@ module Streamly.Internal.Data.Array.Foreign
93 -- , readChunksOfFrom
93 -- , readChunksOfFrom
97− -- , writeFrom -- start writing at the given position
99− -- , writeTo -- write from beginning up to the given position
102− -- , writeFromThenTo
104− -- , writeChunksOfFrom
111 -- -- * Search
96 -- -- * Search
112 -- , bsearch
97 -- , bsearch
113 -- , bsearchIndex
98 -- , bsearchIndex
@@ -465,23 +450,6 @@ readSliceRev :: (IsStream t, Monad m, Storable a)
465readSliceRev arr i len = undefined
450readSliceRev arr i len = undefined
468−-- | /O(1)/ Write the given element at the given index in the array.
469−-- Performs in-place mutation of the array.
472−{-# INLINE writeIndex #-}
473−writeIndex :: (MonadIO m, Storable a) => Array a -> Int -> a -> m ()
474−writeIndex arr i a = do
475− let maxIndex = length arr - 1
477− then error "writeIndex: negative array index"
478− else if i > maxIndex
479− then error $ "writeIndex: specified array index " ++ show i
480− ++ " is beyond the maximum index " ++ show maxIndex
482− liftIO $ unsafeWithForeignPtr (aStart arr) $ \p ->
486-- | @writeSlice arr i count stream@ writes a stream to the array @arr@
454-- | @writeSlice arr i count stream@ writes a stream to the array @arr@
487-- starting at index @i@ and writing up to @count@ elements in the forward
455-- starting at index @i@ and writing up to @count@ elements in the forward