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

Safe HaskellNone
LanguageHaskell98

Data.Array.Comfort.Storable.Mutable.Unchecked

Description

The functions in this module miss any bound checking.

Documentation

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

Constructors

Array 

Fields

type STArray s = Array (ST s) Source #

new :: (PrimMonad m, C sh, Storable a) => sh -> a -> m (Array m sh a) 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 #

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 #

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 #

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

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

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

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