Safe Haskell | None |
---|---|
Language | Haskell2010 |
Foreign Function Interface utilities
Documentation
ffiWithPtr :: Storable a => a -> (Ptr a -> IO b) -> IO b Source #
Passes specified Storable
value as a pointer (to that value) to the specified IO action
Arguments:
val :: Storable a
: Input valuefun :: Ptr a -> IO b
: IO action to run
Return value: Value returned from IO action
ffiWithPtrPtr :: (Ptr (Ptr a) -> IO b) -> IO b Source #
Passes a pointer to a NULL pointer of a Storable
type to the specified IO action
Arguments:
fun :: Ptr (Ptr a) -> IO b
: IO action to run
Return value: Value returned from IO action