vector-0.10.9.1: Efficient Arrays

Copyright | (c) Roman Leshchinskiy 2008-2010
License | BSD-style
Maintainer | Roman Leshchinskiy <rl@cse.unsw.edu.au>
Stability | experimental
Portability | non-portable
Safe Haskell | None
Language | Haskell98

Data.Vector.Generic.New

Description

Purely functional interface to initialisation of mutable vectors

# Documentation

data New v a

Constructors

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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