| 1 |
= CompilationManager |
| 2 |
|
| 3 |
The http://www.smlnj.org/doc/CM/index.html[Compilation Manager] (CM) is SML/NJ's mechanism for supporting programming-in-the-very-large. |
| 4 |
|
| 5 |
== Porting SML/NJ CM files to MLton |
| 6 |
|
| 7 |
To help in porting CM files to MLton, the MLton source distribution |
| 8 |
includes the sources for a utility, `cm2mlb`, that will print an |
| 9 |
<<MLBasis#,ML Basis>> file with essentially the same semantics as the |
| 10 |
CM file -- handling the full syntax of CM supported by your installed |
| 11 |
SML/NJ version and correctly handling export filters. When `cm2mlb` |
| 12 |
encounters a `.cm` import, it attempts to convert it to a |
| 13 |
corresponding `.mlb` import. CM anchored paths are translated to |
| 14 |
paths according to a default configuration file |
| 15 |
(https://github.com/MLton/mlton/blob/master/util/cm2mlb/cm2mlb-map[`cm2mlb-map`]). For example, |
| 16 |
the default configuration includes |
| 17 |
---- |
| 18 |
# Standard ML Basis Library |
| 19 |
$SMLNJ-BASIS $(SML_LIB)/basis |
| 20 |
$basis.cm $(SML_LIB)/basis |
| 21 |
$basis.cm/basis.cm $(SML_LIB)/basis/basis.mlb |
| 22 |
---- |
| 23 |
to ensure that a `$/basis.cm` import is translated to a |
| 24 |
`$(SML_LIB)/basis/basis.mlb` import. See `util/cm2mlb` for details. |
| 25 |
Building `cm2mlb` requires that you have already installed a recent |
| 26 |
version of SML/NJ. |