Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Synopsis
- create :: Storable a => Int -> (Ptr a -> IO b) -> IO (ForeignPtr a, b)
- alloca :: Storable a => Int -> (Ptr a -> IO b) -> IO b
- data MutablePtr a
- new :: Storable a => Int -> IO (MutablePtr a)
- withMutablePtr :: MutablePtr a -> (Ptr a -> IO b) -> IO b
- freeze :: Storable a => Int -> MutablePtr a -> IO (ForeignPtr a)
- freezeInplace :: Storable a => Int -> MutablePtr a -> IO (ForeignPtr a)
- thaw :: Storable a => Int -> ForeignPtr a -> IO (MutablePtr a)
- thawInplace :: Storable a => Int -> ForeignPtr a -> IO (MutablePtr a)
immutable arrays
mutable arrays
data MutablePtr a Source #
withMutablePtr :: MutablePtr a -> (Ptr a -> IO b) -> IO b Source #
freeze :: Storable a => Int -> MutablePtr a -> IO (ForeignPtr a) Source #
The size
parameter must match the size passed to new
.
This is not checked.
freezeInplace :: Storable a => Int -> MutablePtr a -> IO (ForeignPtr a) Source #
freezeInplace
must be the last operation on the MutablePtr
and its associated array.
This is not checked.
thaw :: Storable a => Int -> ForeignPtr a -> IO (MutablePtr a) Source #
thawInplace :: Storable a => Int -> ForeignPtr a -> IO (MutablePtr a) Source #