- data Storable a => GlobalVariable a
- writeGlobalVariable :: Storable a => GlobalVariable a -> a -> IO ()
- readGlobalVariable :: Storable a => GlobalVariable a -> IO a
- class Storable cb => Callback cb where
When libraries provide types for functions those
types are made instances of class
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.
nullCallback can be used like
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
makeCallback after they are no longer going to be
used. Most of the time this class method will just use
Foreign.Ptr.freeHaskellFunPtr. of a foreign function
type after they are no longer going to be used.