<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="AsciiDoc 8.6.8">
<title>ManualPage</title>
<link rel="stylesheet" href="./asciidoc.css" type="text/css">
<link rel="stylesheet" href="./pygments.css" type="text/css">


<script type="text/javascript" src="./asciidoc.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
asciidoc.install();
/*]]>*/
</script>
<link rel="stylesheet" href="./mlton.css" type="text/css"/>
</head>
<body class="article">
<div id="banner">
<div id="banner-home">
<a href="./Home">MLton 20130715</a>
</div>
</div>
<div id="header">
<h1>ManualPage</h1>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>MLton is run from the command line with a collection of options
followed by a file name and a list of files to compile, assemble, and
link with.</p></div>
<div class="listingblock">
<div class="content monospaced">
<pre>mlton [option ...] file.{c|mlb|o|sml} [file.{c|o|s|S} ...]</pre>
</div></div>
<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
a valid SML program, in which case MLton compiles the program to
produce an executable <span class="monospaced">foo</span>.  Since MLton does not support separate
compilation, the program must be the entire program you wish to
compile.  However, the program may refer to signatures and structures
defined in the <a href="BasisLibrary">Basis Library</a>.</p></div>
<div class="paragraph"><p>Larger programs, spanning many files, can be compiled with the
<a href="MLBasis">ML Basis system</a>.  In this case, <span class="monospaced">mlton foo.mlb</span> will
compile the complete SML program described by the basis <span class="monospaced">foo.mlb</span>,
which may specify both SML files and additional bases.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_next_steps">Next Steps</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
<a href="CompileTimeOptions">CompileTimeOptions</a>
</p>
</li>
<li>
<p>
<a href="RunTimeOptions">RunTimeOptions</a>
</p>
</li>
</ul></div>
</div>
</div>
</div>
<div id="footnotes"><hr></div>
<div id="footer">
<div id="footer-text">
</div>
<div id="footer-badges">
</div>
</div>
</body>
</html>
