libffi-0.1: A binding to libffi

Safe HaskellSafe-Infered

Foreign.LibFFI.Base

Description

This module defines the basic libffi machinery. You will need this to create support for new ffi types.

Documentation

newtype Arg Source

Constructors

Arg 

Fields

unArg :: IO (Ptr CType, Ptr CValue, IO ())
 

customPointerArg :: (a -> IO (Ptr b)) -> (Ptr b -> IO ()) -> a -> ArgSource

data RetType a Source

Constructors

RetType (Ptr CType) ((Ptr CValue -> IO ()) -> IO a) 

Instances

withRetType :: (a -> IO b) -> RetType a -> RetType bSource

callFFI :: FunPtr a -> RetType b -> [Arg] -> IO bSource