Next Previous Up Top Contents Index

7 The MLWorks Foreign Interface Library

7.7 The Aliens structure

The Aliens structure is involved with managing externally linked foreign code objects. This interface uses dynamic linking of foreign code (supplied via the underlying OS) and ML makes a record of what objects have been linked in so far. The basic interface for linking foreign code allows code to either be linked immediately (that is, at link time) or when something actually makes use of the code (that is, at call time).

The following functions are used to ensure that the appropriate associations between ML values representing external objects are in the desired state. These facilities could be used to 'reset' associations between foreign code and ML representations and also ensure that up-to-date versions have been obtained.

ensureAliens

Function

Signature:

val ensureAliens : unit -> unit

Description:

Ensures that all objects and associated values are available. This preserves any existing entities that are present.
resetAliens

Function

Signature:

val resetAliens : unit -> unit

Description:

Reset all objects and associated values, so that they are obtained afresh when they are next requested, and not before. This allows lazy semantics for establishing associations.
refreshAliens

Function

Signature:

val refreshAliens : unit -> unit

Description:

Refresh objects and associated values immediately. This re-obtains all external entities, even if they seem to be present.

MLWorks Reference Manual version 2.0 - 29 Jul 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker