monadic-arrays-0.2.2: Boxed and unboxed arrays for monad transformers

Copyright(C) 2011 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
Portabilitytype families, MPTCs
Safe HaskellNone
LanguageHaskell98

Data.Array.MArray.Extras

Description

A higher-order MArray class.

Documentation

class Monad m => MArray1 a f m where #

Methods

getBounds1 :: Ix i => a i (f e) -> m (i, i) #

getNumElements1 :: Ix i => a i (f e) -> m Int #

newArray1 :: Ix i => (i, i) -> f e -> m (a i (f e)) #

newArray1_ :: Ix i => (i, i) -> m (a i (f e)) #

unsafeNewArray1_ :: Ix i => (i, i) -> m (a i (f e)) #

unsafeRead1 :: Ix i => a i (f e) -> Int -> m (f e) #

unsafeWrite1 :: Ix i => a i (f e) -> Int -> f e -> m () #

Instances

MArray1 IOUArray StablePtr IO # 

Methods

getBounds1 :: Ix i => IOUArray i (StablePtr e) -> IO (i, i) #

getNumElements1 :: Ix i => IOUArray i (StablePtr e) -> IO Int #

newArray1 :: Ix i => (i, i) -> StablePtr e -> IO (IOUArray i (StablePtr e)) #

newArray1_ :: Ix i => (i, i) -> IO (IOUArray i (StablePtr e)) #

unsafeNewArray1_ :: Ix i => (i, i) -> IO (IOUArray i (StablePtr e)) #

unsafeRead1 :: Ix i => IOUArray i (StablePtr e) -> Int -> IO (StablePtr e) #

unsafeWrite1 :: Ix i => IOUArray i (StablePtr e) -> Int -> StablePtr e -> IO () #

MArray1 IOUArray Ptr IO # 

Methods

getBounds1 :: Ix i => IOUArray i (Ptr e) -> IO (i, i) #

getNumElements1 :: Ix i => IOUArray i (Ptr e) -> IO Int #

newArray1 :: Ix i => (i, i) -> Ptr e -> IO (IOUArray i (Ptr e)) #

newArray1_ :: Ix i => (i, i) -> IO (IOUArray i (Ptr e)) #

unsafeNewArray1_ :: Ix i => (i, i) -> IO (IOUArray i (Ptr e)) #

unsafeRead1 :: Ix i => IOUArray i (Ptr e) -> Int -> IO (Ptr e) #

unsafeWrite1 :: Ix i => IOUArray i (Ptr e) -> Int -> Ptr e -> IO () #

MArray1 IOUArray FunPtr IO # 

Methods

getBounds1 :: Ix i => IOUArray i (FunPtr e) -> IO (i, i) #

getNumElements1 :: Ix i => IOUArray i (FunPtr e) -> IO Int #

newArray1 :: Ix i => (i, i) -> FunPtr e -> IO (IOUArray i (FunPtr e)) #

newArray1_ :: Ix i => (i, i) -> IO (IOUArray i (FunPtr e)) #

unsafeNewArray1_ :: Ix i => (i, i) -> IO (IOUArray i (FunPtr e)) #

unsafeRead1 :: Ix i => IOUArray i (FunPtr e) -> Int -> IO (FunPtr e) #

unsafeWrite1 :: Ix i => IOUArray i (FunPtr e) -> Int -> FunPtr e -> IO () #

MArray1 IOUArray e IO => MArray1 (UArr IO) e IO # 

Methods

getBounds1 :: Ix i => UArr IO i (e e) -> IO (i, i) #

getNumElements1 :: Ix i => UArr IO i (e e) -> IO Int #

newArray1 :: Ix i => (i, i) -> e e -> IO (UArr IO i (e e)) #

newArray1_ :: Ix i => (i, i) -> IO (UArr IO i (e e)) #

unsafeNewArray1_ :: Ix i => (i, i) -> IO (UArr IO i (e e)) #

unsafeRead1 :: Ix i => UArr IO i (e e) -> Int -> IO (e e) #

unsafeWrite1 :: Ix i => UArr IO i (e e) -> Int -> e e -> IO () #

MArray1 (STUArray s) FunPtr (ST s) # 

Methods

getBounds1 :: Ix i => STUArray s i (FunPtr e) -> ST s (i, i) #

getNumElements1 :: Ix i => STUArray s i (FunPtr e) -> ST s Int #

newArray1 :: Ix i => (i, i) -> FunPtr e -> ST s (STUArray s i (FunPtr e)) #

newArray1_ :: Ix i => (i, i) -> ST s (STUArray s i (FunPtr e)) #

unsafeNewArray1_ :: Ix i => (i, i) -> ST s (STUArray s i (FunPtr e)) #

unsafeRead1 :: Ix i => STUArray s i (FunPtr e) -> Int -> ST s (FunPtr e) #

unsafeWrite1 :: Ix i => STUArray s i (FunPtr e) -> Int -> FunPtr e -> ST s () #

MArray1 (STUArray s) StablePtr (ST s) # 

Methods

getBounds1 :: Ix i => STUArray s i (StablePtr e) -> ST s (i, i) #

getNumElements1 :: Ix i => STUArray s i (StablePtr e) -> ST s Int #

newArray1 :: Ix i => (i, i) -> StablePtr e -> ST s (STUArray s i (StablePtr e)) #

newArray1_ :: Ix i => (i, i) -> ST s (STUArray s i (StablePtr e)) #

unsafeNewArray1_ :: Ix i => (i, i) -> ST s (STUArray s i (StablePtr e)) #

unsafeRead1 :: Ix i => STUArray s i (StablePtr e) -> Int -> ST s (StablePtr e) #

unsafeWrite1 :: Ix i => STUArray s i (StablePtr e) -> Int -> StablePtr e -> ST s () #

MArray1 (STUArray s) Ptr (ST s) # 

Methods

getBounds1 :: Ix i => STUArray s i (Ptr e) -> ST s (i, i) #

getNumElements1 :: Ix i => STUArray s i (Ptr e) -> ST s Int #

newArray1 :: Ix i => (i, i) -> Ptr e -> ST s (STUArray s i (Ptr e)) #

newArray1_ :: Ix i => (i, i) -> ST s (STUArray s i (Ptr e)) #

unsafeNewArray1_ :: Ix i => (i, i) -> ST s (STUArray s i (Ptr e)) #

unsafeRead1 :: Ix i => STUArray s i (Ptr e) -> Int -> ST s (Ptr e) #

unsafeWrite1 :: Ix i => STUArray s i (Ptr e) -> Int -> Ptr e -> ST s () #

(MonadTrans t, Monad (t m), MonadUArray m, MArray1 (UArr m) f m) => MArray1 (UArr (t m)) f (t m) # 

Methods

getBounds1 :: Ix i => UArr (t m) i (f e) -> t m (i, i) #

getNumElements1 :: Ix i => UArr (t m) i (f e) -> t m Int #

newArray1 :: Ix i => (i, i) -> f e -> t m (UArr (t m) i (f e)) #

newArray1_ :: Ix i => (i, i) -> t m (UArr (t m) i (f e)) #

unsafeNewArray1_ :: Ix i => (i, i) -> t m (UArr (t m) i (f e)) #

unsafeRead1 :: Ix i => UArr (t m) i (f e) -> Int -> t m (f e) #

unsafeWrite1 :: Ix i => UArr (t m) i (f e) -> Int -> f e -> t m () #

MArray1 (STUArray s) e (ST s) => MArray1 (UArr (ST s)) e (ST s) # 

Methods

getBounds1 :: Ix i => UArr (ST s) i (e e) -> ST s (i, i) #

getNumElements1 :: Ix i => UArr (ST s) i (e e) -> ST s Int #

newArray1 :: Ix i => (i, i) -> e e -> ST s (UArr (ST s) i (e e)) #

newArray1_ :: Ix i => (i, i) -> ST s (UArr (ST s) i (e e)) #

unsafeNewArray1_ :: Ix i => (i, i) -> ST s (UArr (ST s) i (e e)) #

unsafeRead1 :: Ix i => UArr (ST s) i (e e) -> Int -> ST s (e e) #

unsafeWrite1 :: Ix i => UArr (ST s) i (e e) -> Int -> e e -> ST s () #