<!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>FAQ</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(2);
/*]]>*/
</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>FAQ</h1>
<div id="toc">
  <div id="toctitle">Table of Contents</div>
  <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>Feel free to ask questions and to update answers by editing this page.
Since we try to make as much information as possible available on the
web site and we like to avoid duplication, many of the answers are
simply links to a web page that answers the question.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_how_do_you_pronounce_mlton">How do you pronounce MLton?</h2>
<div class="sectionbody">
<div class="paragraph"><p><a href="Pronounce">Pronounce</a></p></div>
</div>
</div>
<div class="sect1">
<h2 id="_what_sml_software_has_been_ported_to_mlton">What SML software has been ported to MLton?</h2>
<div class="sectionbody">
<div class="paragraph"><p><a href="Libraries">Libraries</a></p></div>
</div>
</div>
<div class="sect1">
<h2 id="_what_graphical_libraries_are_available_for_mlton">What graphical libraries are available for MLton?</h2>
<div class="sectionbody">
<div class="paragraph"><p><a href="Libraries">Libraries</a></p></div>
</div>
</div>
<div class="sect1">
<h2 id="_how_does_mlton_8217_s_performance_compare_to_other_sml_compilers_and_to_other_languages">How does MLton&#8217;s performance compare to other SML compilers and to other languages?</h2>
<div class="sectionbody">
<div class="paragraph"><p>MLton has <a href="Performance">excellent performance</a>.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_does_mlton_treat_monomorphic_arrays_and_vectors_specially">Does MLton treat monomorphic arrays and vectors specially?</h2>
<div class="sectionbody">
<div class="paragraph"><p>MLton implements monomorphic arrays and vectors (e.g. <span class="monospaced">BoolArray</span>,
<span class="monospaced">Word8Vector</span>) exactly as instantiations of their polymorphic
counterpart (e.g. <span class="monospaced">bool array</span>, <span class="monospaced">Word8.word vector</span>).  Thus, there is
no need to use the monomorphic versions except when required to
interface with the <a href="BasisLibrary">Basis Library</a> or for portability
with other SML implementations.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_why_do_i_get_a_segfault_bus_error_in_a_program_that_uses_span_class_monospaced_intinf_span_span_class_monospaced_largeint_span_to_calculate_numbers_with_several_hundred_thousand_digits">Why do I get a Segfault/Bus error in a program that uses <span class="monospaced">IntInf</span>/<span class="monospaced">LargeInt</span> to calculate numbers with several hundred thousand digits?</h2>
<div class="sectionbody">
<div class="paragraph"><p><a href="GMP">GMP</a></p></div>
</div>
</div>
<div class="sect1">
<h2 id="_how_can_i_decrease_compile_time_memory_usage">How can I decrease compile-time memory usage?</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
Compile with <span class="monospaced">-verbose 3</span> to find out if the problem is due to an
SSA optimization pass.  If so, compile with <span class="monospaced">-disable-pass <em>pass</em></span> to
skip that pass.
</p>
</li>
<li>
<p>
Compile with <span class="monospaced">@MLton hash-cons 0.5 --</span>, which will instruct the
runtime to hash cons the heap every other GC.
</p>
</li>
<li>
<p>
Compile with <span class="monospaced">-polyvariance false</span>, which is an undocumented option
that causes less code duplication.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Also, please <a href="Contact">Contact</a> us to let us know the problem to help us
better understand MLton&#8217;s limitations.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_how_portable_is_sml_code_across_sml_compilers">How portable is SML code across SML compilers?</h2>
<div class="sectionbody">
<div class="paragraph"><p><a href="StandardMLPortability">StandardMLPortability</a></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>
