Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / localhost / ManualPage
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>ManualPage</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>ManualPage</h1>
27 </div>
28 <div id="content">
29 <div id="preamble">
30 <div class="sectionbody">
31 <div class="paragraph"><p>MLton is run from the command line with a collection of options
32 followed by a file name and a list of files to compile, assemble, and
33 link with.</p></div>
34 <div class="listingblock">
35 <div class="content monospaced">
36 <pre>mlton [option ...] file.{c|mlb|o|sml} [file.{c|o|s|S} ...]</pre>
37 </div></div>
38 <div class="paragraph"><p>The simplest case is to run <span class="monospaced">mlton foo.sml</span>, where <span class="monospaced">foo.sml</span> contains
39 a valid SML program, in which case MLton compiles the program to
40 produce an executable <span class="monospaced">foo</span>. Since MLton does not support separate
41 compilation, the program must be the entire program you wish to
42 compile. However, the program may refer to signatures and structures
43 defined in the <a href="BasisLibrary">Basis Library</a>.</p></div>
44 <div class="paragraph"><p>Larger programs, spanning many files, can be compiled with the
45 <a href="MLBasis">ML Basis system</a>. In this case, <span class="monospaced">mlton foo.mlb</span> will
46 compile the complete SML program described by the basis <span class="monospaced">foo.mlb</span>,
47 which may specify both SML files and additional bases.</p></div>
48 </div>
49 </div>
50 <div class="sect1">
51 <h2 id="_next_steps">Next Steps</h2>
52 <div class="sectionbody">
53 <div class="ulist"><ul>
54 <li>
55 <p>
56 <a href="CompileTimeOptions">CompileTimeOptions</a>
57 </p>
58 </li>
59 <li>
60 <p>
61 <a href="RunTimeOptions">RunTimeOptions</a>
62 </p>
63 </li>
64 </ul></div>
65 </div>
66 </div>
67 </div>
68 <div id="footnotes"><hr></div>
69 <div id="footer">
70 <div id="footer-text">
71 </div>
72 <div id="footer-badges">
73 </div>
74 </div>
75 </body>
76 </html>