vector-0.10.12.3: Efficient Arrays

Copyright(c) Roman Leshchinskiy 2008-2010
LicenseBSD-style
MaintainerRoman Leshchinskiy <rl@cse.unsw.edu.au>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

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 a Source

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 a Source

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

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

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

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

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

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

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

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

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

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

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

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

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

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