with :: Storable a => a -> (Ptr a -> IO b) -> IO b |
The memory is freed when f terminates (either normally or via an exception), so the pointer passed to f must not be used after this.
new :: Storable a => a -> IO (Ptr a) |
The memory may be deallocated using Foreign.Marshal.Alloc.free or Foreign.Marshal.Alloc.finalizerFree when no longer required.
fromBool :: Num a => Bool -> a |
toBool :: Num a => a -> Bool |
maybeNew :: (a -> IO (Ptr a)) -> Maybe a -> IO (Ptr a) |
maybeWith :: (a -> (Ptr b -> IO c) -> IO c) |
-> Maybe a -> (Ptr b -> IO c) -> IO c |
maybePeek :: (Ptr a -> IO b) -> Ptr a -> IO (Maybe b) |
withMany :: (a -> (b -> res) -> res) -> [a] -> ([b] -> res) -> res |
(argument order: destination, source)
copyBytes :: Ptr a -> Ptr a -> Int -> IO () |
moveBytes :: Ptr a -> Ptr a -> Int -> IO () |