<!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>MLtonPlatform</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>MLtonPlatform</h1>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="listingblock">
<div class="content"><div class="highlight"><pre><span></span><span class="k">signature</span><span class="w"> </span><span class="n">MLTON_PLATFORM</span><span class="w"> </span><span class="p">=</span><span class="w"></span>
<span class="w">   </span><span class="k">sig</span><span class="w"></span>
<span class="w">      </span><span class="k">structure</span><span class="w"> </span><span class="n">Arch</span><span class="p">:</span><span class="w"></span>
<span class="w">         </span><span class="k">sig</span><span class="w"></span>
<span class="w">            </span><span class="k">datatype</span><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="n">Alpha</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">AMD64</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">ARM</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">ARM64</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">HPPA</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">IA64</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">m68k</span><span class="w"></span>
<span class="w">                       </span><span class="p">|</span><span class="w"> </span><span class="n">MIPS</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">PowerPC</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">PowerPC64</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">S390</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">Sparc</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">X86</span><span class="w"></span>

<span class="w">            </span><span class="k">val</span><span class="w"> </span><span class="n">fromString</span><span class="p">:</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="n">option</span><span class="w"></span>
<span class="w">            </span><span class="k">val</span><span class="w"> </span><span class="n">host</span><span class="p">:</span><span class="w"> </span><span class="n">t</span><span class="w"></span>
<span class="w">            </span><span class="k">val</span><span class="w"> </span><span class="n">toString</span><span class="p">:</span><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="n">string</span><span class="w"></span>
<span class="w">         </span><span class="k">end</span><span class="w"></span>

<span class="w">      </span><span class="k">structure</span><span class="w"> </span><span class="n">OS</span><span class="p">:</span><span class="w"></span>
<span class="w">         </span><span class="k">sig</span><span class="w"></span>
<span class="w">            </span><span class="k">datatype</span><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="n">AIX</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">Cygwin</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">Darwin</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">FreeBSD</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">Hurd</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">HPUX</span><span class="w"></span>
<span class="w">                       </span><span class="p">|</span><span class="w"> </span><span class="n">Linux</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">MinGW</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">NetBSD</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">OpenBSD</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="n">Solaris</span><span class="w"></span>

<span class="w">            </span><span class="k">val</span><span class="w"> </span><span class="n">fromString</span><span class="p">:</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="n">option</span><span class="w"></span>
<span class="w">            </span><span class="k">val</span><span class="w"> </span><span class="n">host</span><span class="p">:</span><span class="w"> </span><span class="n">t</span><span class="w"></span>
<span class="w">            </span><span class="k">val</span><span class="w"> </span><span class="n">toString</span><span class="p">:</span><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="n">string</span><span class="w"></span>
<span class="w">         </span><span class="k">end</span><span class="w"></span>
<span class="w">   </span><span class="k">end</span><span class="w"></span>
</pre></div></div></div>
<div class="ulist"><ul>
<li>
<p>
<span class="monospaced">datatype Arch.t</span>
</p>
<div class="paragraph"><p>processor architectures</p></div>
</li>
<li>
<p>
<span class="monospaced">Arch.fromString a</span>
</p>
<div class="paragraph"><p>converts from string to architecture.  Case insensitive.</p></div>
</li>
<li>
<p>
<span class="monospaced">Arch.host</span>
</p>
<div class="paragraph"><p>the architecture for which the program is compiled.</p></div>
</li>
<li>
<p>
<span class="monospaced">Arch.toString</span>
</p>
<div class="paragraph"><p>string for architecture.</p></div>
</li>
<li>
<p>
<span class="monospaced">datatype OS.t</span>
</p>
<div class="paragraph"><p>operating systems</p></div>
</li>
<li>
<p>
<span class="monospaced">OS.fromString</span>
</p>
<div class="paragraph"><p>converts from string to operating system.  Case insensitive.</p></div>
</li>
<li>
<p>
<span class="monospaced">OS.host</span>
</p>
<div class="paragraph"><p>the operating system for which the program is compiled.</p></div>
</li>
<li>
<p>
<span class="monospaced">OS.toString</span>
</p>
<div class="paragraph"><p>string for operating system.</p></div>
</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>
