@@ -93,21 +93,6 @@ module Streamly.Internal.Data.Array.Foreign
9393 -- , readChunksOfFrom
9494 -- , ...
9595
96− -- , writeIndex
97− -- , writeFrom -- start writing at the given position
98− -- , writeFromRev
99− -- , writeTo -- write from beginning up to the given position
100− -- , writeToRev
101− -- , writeFromTo
102− -- , writeFromThenTo
103− --
104− -- , writeChunksOfFrom
105− -- , ...
106−
107− , writeIndex
108− --, writeIndices
109− --, writeRanges
110−
11196 -- -- * Search
11297 -- , bsearch
11398 -- , bsearchIndex
@@ -465,23 +450,6 @@ readSliceRev :: (IsStream t, Monad m, Storable a)
465450readSliceRev arr i len = undefined
466451-}
467452
468−-- | /O(1)/ Write the given element at the given index in the array.
469−-- Performs in-place mutation of the array.
470−--
471−-- /Pre-release/
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
476− if i < 0
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
481− else
482− liftIO $ unsafeWithForeignPtr (aStart arr) $ \p ->
483− pokeElemOff p i a
484−
485453{-
486454-- | @writeSlice arr i count stream@ writes a stream to the array @arr@
487455-- starting at index @i@ and writing up to @count@ elements in the forward