This module assumes that you are familiar with the funcitons of the same name in Foreign.Marshall.Alloc, Foreign.Marshal.AllocArray and in Foreign.ForeignPtr.
The functions are generalized to work in any monad which is an instance of MonadCatchIO.
Documentation
alloca :: (Storable a, MonadCatchIO m) => (Ptr a -> m b) -> m bSource
allocaBytes :: MonadCatchIO m => Int -> (Ptr a -> m b) -> m bSource
allocaArray :: (Storable a, MonadCatchIO m) => Int -> (Ptr a -> m b) -> m bSource
allocaArray0 :: (Storable a, MonadCatchIO m) => Int -> (Ptr a -> m b) -> m bSource
withForeignPtr :: MonadCatchIO m => ForeignPtr a -> (Ptr a -> m b) -> m bSource