
3 Using the MLWorks Libraries
foreign, and Standard ML Basis library units are stored under basis. Each unit in an MLWorks library contains either a structure, a functor, or a signature. The unit names are based on the names of the structure, functor, or signature that they contain. The prefix of the unit name indicates which of the three kinds of SML module it contains:
__ (two underscores)
_ (one underscore)
signature LIST_UTILS becomes list_utils.moBeware of swapping singular for plural (or vice versa).structure ListUtils becomes __list_utils.mo
Some units contain signatures or structures that are sub-components of other signatures or structures. In these cases, any "." separators in the SML identifier are replaced by single underscores. For example:
structure OS.Process becomes __os_process.moThe object-file versions of units have the usual extension
.mo, and the source versions (if any) have the extension .sml. Typically, structures and functors are distributed in object-file form only, and signatures are distributed in both source-file and object-file form. The availability of the signature in source form permits you to use the structure or functor it defines, or indeed to extend the library by writing new structures and functors using the signature.
(This distribution method is similar to the way C programming libraries are often distributed: "implementation" files (.c) are usually only distributed in compiled form (.o or .so), but header files (.h), which specify the interface to the library, are distributed in source form. However, in MLWorks the "header" files are distributed in object form as well.)
The image files for the libraries, which contain pre-loaded versions of the compiled units, are stored in the directory images.
The following is a complete list of compounds (subdirectories of the top-level installation directory):
basis
foreign
motif
pervasiveMLWorks structure) units and the Standard ML Basis library's General structure, both of which are necessary to run all code compiled with MLWorks. The General structure is also available in basis.
system
utils
unixsystem compound is a link to this.
The following is a complete list of library images:
basis.img
foreign.img
pervasive.img
xm.img
Note: This is not the complete list of images, just that of library images: there are also images for the batch compiler and the MLWorks interactive environment itself. The batch compiler image is batch.img. The interactive environment with the pervasive library (MLWorks), the Standard ML Basis library's General structure, and the interactive environment library (Shell) is gui.img, and a copy of the interactive environment including the entire Standard ML Basis library is guib.img.

Generated with Harlequin WebMaker