vector-0.10.9.1: Efficient Arrays

Portabilitynon-portable
Stabilityexperimental
MaintainerRoman Leshchinskiy <rl@cse.unsw.edu.au>
Safe HaskellNone

Data.Vector.Generic.New

Description

Purely functional interface to initialisation of mutable vectors

Documentation

data New v a Source

Constructors

New (forall s. ST s (Mutable v s a)) 

create :: (forall s. ST s (Mutable v s a)) -> New v aSource

run :: New v a -> ST s (Mutable v s a)Source

runPrim :: PrimMonad m => New v a -> m (Mutable v (PrimState m) a)Source

apply :: (forall s. Mutable v s a -> Mutable v s a) -> New v a -> New v aSource

modify :: (forall s. Mutable v s a -> ST s ()) -> New v a -> New v aSource

modifyWithStream :: (forall s. Mutable v s a -> Stream b -> ST s ()) -> New v a -> Stream b -> New v aSource

unstream :: Vector v a => Stream a -> New v aSource

transform :: Vector v a => (forall m. Monad m => MStream m a -> MStream m a) -> New v a -> New v aSource

unstreamR :: Vector v a => Stream a -> New v aSource

transformR :: Vector v a => (forall m. Monad m => MStream m a -> MStream m a) -> New v a -> New v aSource

slice :: Vector v a => Int -> Int -> New v a -> New v aSource

init :: Vector v a => New v a -> New v aSource

tail :: Vector v a => New v a -> New v aSource

take :: Vector v a => Int -> New v a -> New v aSource

drop :: Vector v a => Int -> New v a -> New v aSource

unsafeSlice :: Vector v a => Int -> Int -> New v a -> New v aSource

unsafeInit :: Vector v a => New v a -> New v aSource

unsafeTail :: Vector v a => New v a -> New v aSource