<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="AsciiDoc 8.6.10">
<title>ShowBasisDirective</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 20201002</a>
</div>
</div>
<div id="header">
<h1>ShowBasisDirective</h1>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>A comment of the form <span class="monospaced">(*#showBasis "&lt;file&gt;"*)</span> is recognized as a directive to
save the current basis (i.e., environment) to <span class="monospaced">&lt;file&gt;</span> (in the same format as
the <span class="monospaced">-show-basis &lt;file&gt;</span> <a href="CompileTimeOptions"> compile-time option</a>).  The
<span class="monospaced">&lt;file&gt;</span> is interpreted relative to the source file in which it appears.  The
comment is lexed as a distinct token and is parsed as a structure-level
declaration.  [Note that treating the directive as a top-level declaration would
prohibit using it inside a functor body, which would make the feature
significantly less useful in the context of the MLton compiler sources (with its
nearly fully functorial style).]</p></div>
<div class="paragraph"><p>This feature is meant to facilitate auto-completion via
<a href="https://github.com/MatthewFluet/company-mlton"><span class="monospaced">company-mlton</span></a> and similar
tools.</p></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>
