Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / localhost / CompilationManager
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
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">
9
10
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
13 /*<![CDATA[*/
14 asciidoc.install();
15 /*]]>*/
16 </script>
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
18 </head>
19 <body class="article">
20 <div id="banner">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
23 </div>
24 </div>
25 <div id="header">
26 <h1>CompilationManager</h1>
27 </div>
28 <div id="content">
29 <div id="preamble">
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&#8217;s mechanism for supporting programming-in-the-very-large.</p></div>
32 </div>
33 </div>
34 <div class="sect1">
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&#8201;&#8212;&#8201;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>
53 </div></div>
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>
58 </div>
59 </div>
60 </div>
61 <div id="footnotes"><hr></div>
62 <div id="footer">
63 <div id="footer-text">
64 </div>
65 <div id="footer-badges">
66 </div>
67 </div>
68 </body>
69 </html>