primitive-extras-0.2: Extras for the "primitive" library

Safe HaskellNone
LanguageHaskell2010

PrimitiveExtras.Monad

Synopsis

Documentation

primMultiArray :: (Monad m, Prim element) => Int -> (forall x. Fold (Int, element) x -> m x) -> m (PrimMultiArray element) Source #

Given a size of the outer array and a function, which executes a fold over indexed elements in a monad, constructs a prim multi-array

replicateMPrimArray :: (Monad m, Prim element) => Int -> m element -> m (PrimArray element) Source #

Please notice that this function is highly untested

traverseUnliftedArray_ :: (Monad m, PrimUnlifted a) => (a -> m ()) -> UnliftedArray a -> m () Source #