4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>CompilationManager</title>
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
19 <body class="article">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
26 <h1>CompilationManager</h1>
30 <div class="sectionbody">
31 <div class="paragraph"><p>The <a href="http://www.smlnj.org/doc/CM/index.html">Compilation Manager</a> (CM) is SML/NJ’s mechanism for supporting programming-in-the-very-large.</p></div>
35 <h2 id="_porting_sml_nj_cm_files_to_mlton">Porting SML/NJ CM files to MLton</h2>
36 <div class="sectionbody">
37 <div class="paragraph"><p>To help in porting CM files to MLton, the MLton source distribution
38 includes the sources for a utility, <span class="monospaced">cm2mlb</span>, that will print an
39 <a href="MLBasis"> ML Basis</a> file with essentially the same semantics as the
40 CM file — handling the full syntax of CM supported by your installed
41 SML/NJ version and correctly handling export filters. When <span class="monospaced">cm2mlb</span>
42 encounters a <span class="monospaced">.cm</span> import, it attempts to convert it to a
43 corresponding <span class="monospaced">.mlb</span> import. CM anchored paths are translated to
44 paths according to a default configuration file
45 (<a href="https://github.com/MLton/mlton/blob/master/util/cm2mlb/cm2mlb-map"><span class="monospaced">cm2mlb-map</span></a>). For example,
46 the default configuration includes</p></div>
47 <div class="listingblock">
48 <div class="content monospaced">
49 <pre># Standard ML Basis Library
50 $SMLNJ-BASIS $(SML_LIB)/basis
51 $basis.cm $(SML_LIB)/basis
52 $basis.cm/basis.cm $(SML_LIB)/basis/basis.mlb</pre>
54 <div class="paragraph"><p>to ensure that a <span class="monospaced">$/basis.cm</span> import is translated to a
55 <span class="monospaced">$(SML_LIB)/basis/basis.mlb</span> import. See <span class="monospaced">util/cm2mlb</span> for details.
56 Building <span class="monospaced">cm2mlb</span> requires that you have already installed a recent
57 version of SML/NJ.</p></div>
61 <div id="footnotes"><hr></div>
63 <div id="footer-text">
65 <div id="footer-badges">