| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | GHC2021 | 
Database.LSMTree.Internal.Vector
Synopsis
- mkPrimVector :: forall a. Prim a => Int -> Int -> ByteArray -> Vector a
 - byteVectorFromPrim :: forall a. Prim a => a -> Vector Word8
 - noRetainedExtraMemory :: forall a. Prim a => Vector a -> Bool
 - primArrayToPrimVector :: Prim a => PrimArray a -> Vector a
 - mapStrict :: forall a b. (a -> b) -> Vector a -> Vector b
 - mapMStrict :: Monad m => (a -> m b) -> Vector a -> m (Vector b)
 - imapMStrict :: Monad m => (Int -> a -> m b) -> Vector a -> m (Vector b)
 - forMStrict :: Monad m => Vector a -> (a -> m b) -> m (Vector b)
 - zipWithStrict :: forall a b c. (a -> b -> c) -> Vector a -> Vector b -> Vector c
 - binarySearchL :: Ord a => Vector a -> a -> Int
 - unsafeInsertWithMStrict :: PrimMonad m => MVector (PrimState m) (Maybe a) -> (a -> a -> a) -> Int -> a -> m ()
 - unfoldrNM' :: PrimMonad m => Int -> (b -> m (Maybe a, b)) -> b -> m (Vector a, b)
 
Documentation
mapStrict :: forall a b. (a -> b) -> Vector a -> Vector b Source #
( O(n) ) Like map, but strict in the produced elements of type b.
mapMStrict :: Monad m => (a -> m b) -> Vector a -> m (Vector b) Source #
( O(n) ) Like mapM, but strict in the produced elements of type b.
imapMStrict :: Monad m => (Int -> a -> m b) -> Vector a -> m (Vector b) Source #
( O(n) ) Like imapM, but strict in the produced elements of type b.
forMStrict :: Monad m => Vector a -> (a -> m b) -> m (Vector b) Source #
( O(n) ) Like forM, but strict in the produced elements of type b.
zipWithStrict :: forall a b c. (a -> b -> c) -> Vector a -> Vector b -> Vector c Source #
( O(min(m,n)) ) Like zipWithM, but strict in the produced elements of
 type c.
binarySearchL :: Ord a => Vector a -> a -> Int Source #
Finds the lowest index in a given sorted vector at which the given element could be inserted while maintaining the sortedness.
This is a variant of binarySearchL for
    immutable vectors.
unsafeInsertWithMStrict Source #
Arguments
| :: PrimMonad m | |
| => MVector (PrimState m) (Maybe a) | |
| -> (a -> a -> a) | function   | 
| -> Int | |
| -> a | |
| -> m () | 
Insert (in a broad sense) an entry in a mutable vector at a given index,
 but if a Just entry already exists at that index, combine the two entries
 using f.
unfoldrNM' :: PrimMonad m => Int -> (b -> m (Maybe a, b)) -> b -> m (Vector a, b) Source #
A version of unfoldrNM that also returns the final state.
O(n) Construct a vector by repeatedly applying the monadic generator
 function to a seed. The generator function also yields Just the next
 element or Nothing if there are no more elements.
The state as well as all elements of the result vector are forced to weak head normal form.