comfort-array-0.4: Arrays where the index type is a function of the shape type

Safe HaskellNone
LanguageHaskell98

Data.Array.Comfort.Storable.Mutable.Private

Documentation

data Array (m :: * -> *) sh a Source #

Constructors

Array 

Fields

type STArray s = Array (ST s) Source #

copy :: (PrimMonad m, C sh, Storable a) => Array m sh a -> m (Array m sh a) Source #

create :: (C sh, Storable a) => sh -> (Ptr a -> IO ()) -> IO (IOArray sh a) Source #

createWithSize :: (C sh, Storable a) => sh -> (Int -> Ptr a -> IO ()) -> IO (IOArray sh a) Source #

createWithSizeAndResult :: (C sh, Storable a) => sh -> (Int -> Ptr a -> IO b) -> IO (IOArray sh a, b) Source #

unsafeCreate :: (PrimMonad m, C sh, Storable a) => sh -> (Ptr a -> IO ()) -> m (Array m sh a) Source #

unsafeCreateWithSize :: (PrimMonad m, C sh, Storable a) => sh -> (Int -> Ptr a -> IO ()) -> m (Array m sh a) Source #

unsafeCreateWithSizeAndResult :: (PrimMonad m, C sh, Storable a) => sh -> (Int -> Ptr a -> IO b) -> m (Array m sh a, b) Source #

show :: (PrimMonad m, C sh, Show sh, Storable a, Show a) => Array m sh a -> m String Source #

withArrayPtr :: PrimMonad m => MutablePtr a -> (Ptr a -> IO b) -> m b Source #

withPtr :: PrimMonad m => Array m sh a -> (Ptr a -> IO b) -> m b Source #

read :: (PrimMonad m, Indexed sh, Storable a) => Array m sh a -> Index sh -> m a Source #

write :: (PrimMonad m, Indexed sh, Storable a) => Array m sh a -> Index sh -> a -> m () Source #

update :: (PrimMonad m, Indexed sh, Storable a) => Array m sh a -> Index sh -> (a -> a) -> m () Source #

new :: (PrimMonad m, C sh, Storable a) => sh -> a -> m (Array m sh a) Source #

toList :: (PrimMonad m, C sh, Storable a) => Array m sh a -> m [a] Source #

fromList :: (PrimMonad m, C sh, Storable a) => sh -> [a] -> m (Array m sh a) Source #

vectorFromList :: (PrimMonad m, Storable a) => [a] -> m (Array m (ZeroBased Int) a) Source #