As we saw in Chapter 2, in the project management system we can consider source and object files to be units. All library units (that is, all the library object files) are stored in the objects/Release directory.
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)
no prefix
The rest of the unit name is the name of the structure, functor or signature, converted to lower case, with word breaks indicated by underscores. For example:
signature LIST_UTILS becomes list_utils.mo structure ListUtils becomes __list_utils.mo
Beware of swapping singular names for plural (and vice versa).
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.mo
The 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):
basisCompound for most Standard ML Basis signature files.
binCompound for scripts to run MLWorks runtime and images. It also contains some shared libraries.
examplesContains example files demonstrating the use of projects, threads, the basis library, and so on.
imagesContains the MLWorks images.
pervasive Compound for MLWorks pervasive library (MLWorks 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.
utilsCompound for mutexes signatures.
unixCompound for MLWorks Motif interface library units.
The following is a complete list of library images:
basis.imgAn image of the Standard ML Basis library.
pervasive.imgAn image of the MLWorks pervasive library.
xm.imgAn image of the MLWorks Motif interface library
Note: This is not the complete list of images, just that of library images: there is also an image 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 in gui.img, and a copy of the interactive environment including the entire Standard ML Basis library is in guib.img.