|
|
|
|
Synopsis |
|
|
|
Documentation |
|
|
Haskell FFI imports global variables as pointers. To
ease manipulation of such pointers they are encapsulated
by GlobalVariable so that values can be reached
directly, much like in an Data.IORef.
|
|
|
|
|
|
|
|
When libraries provide types for functions those
types are made instances of class Callback. That
class is used to exchange between Haskell functions
and a representation (i.e., a hidden pointer) that
can be used or is provided by foreign code.
| | Associated Types | | The associated type is the function type
as it is used in Haskell.
|
|
| | Methods | | nullCallback can be used like Foreign.Ptr.nullFunPtr.
| | | makeCallback takes a Haskell function and
gives a representation of it in the form of the
type expected by foreign code.
| | | freeCallback should be called on all values returned
by makeCallback after they are no longer going to be
used. Most of the time this class method will just use
Foreign.Ptr.freeHaskellFunPtr.
| | | withCallback just inserts an action between
calls to makeCallback and freeCallback.
Of course, it can't be used when foreign code
will save such action for latter use.
|
|
|
|
Produced by Haddock version 2.4.2 |