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