Go to the first, previous, next, last section, table of contents.

Foreign objects

A `ForeignObj#' is a reference to an object outside the Haskell world (i.e., from the C world, or a reference to an object on another machine completely.), where the Haskell world has been told "Let me know when you're finished with this ...".
type ForeignObj#
GHC provides two primitives on `ForeignObj#':
makeForeignObj# 
        :: Addr# -- foreign reference
        -> Addr# -- pointer to finalisation routine
        -> StateAndForeignObj# RealWorld ForeignObj#
writeForeignObj 
        :: ForeignObj#        -- foreign object
        -> Addr#              -- datum
        -> State# RealWorld
        -> State# RealWorld
The module `Foreign' (Section See section Foreign objects) provides a more programmer-friendly interface to foreign objects.
Go to the first, previous, next, last section, table of contents.