MLton CompilationManager
Home  Index  Local Site Map
The [WWW]Compilation Manager (CM) is SML/NJ's mechanism for supporting programming-in-the-very-large.

Porting SML/NJ CM files to MLton

To help in porting CM files to MLton, the MLton source distribution includes the sources for a utility, cmmlb, that will print an ML Basis file with essentially the same semantics as the CM file -- handling the full syntax of CM supported by your installed SML/NJ version and correctly handling export filters. When cm2mlb encounters a .cm import, it attempts to convert it to a corresponding .mlb import. CM anchored paths are translated to paths according to a default configuration file (cm2mlb-map). For example, the default configuration includes

# Standard ML Basis Library
$SMLNJ-BASIS                            $(SML_LIB)/basis
$basis.cm                               $(SML_LIB)/basis
$basis.cm/basis.cm                      $(SML_LIB)/basis/basis.mlb
to ensure that a $/basis.cm import is translated to a $(SML_LIB)/basis/basis.mlb import. See util/cm2mlb for details. Building cm2mlb requires that you have already installed a recent version of SML/NJ.


Last edited on 2011-06-15 17:52:42 by MatthewFluet.
Actions: AttachFile, Delete, Edit, Info, Rename Preferences