Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / localhost / FAQ
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>FAQ</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(2);
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>FAQ</h1>
27 <div id="toc">
28 <div id="toctitle">Table of Contents</div>
29 <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
30 </div>
31 </div>
32 <div id="content">
33 <div id="preamble">
34 <div class="sectionbody">
35 <div class="paragraph"><p>Feel free to ask questions and to update answers by editing this page.
36 Since we try to make as much information as possible available on the
37 web site and we like to avoid duplication, many of the answers are
38 simply links to a web page that answers the question.</p></div>
39 </div>
40 </div>
41 <div class="sect1">
42 <h2 id="_how_do_you_pronounce_mlton">How do you pronounce MLton?</h2>
43 <div class="sectionbody">
44 <div class="paragraph"><p><a href="Pronounce">Pronounce</a></p></div>
45 </div>
46 </div>
47 <div class="sect1">
48 <h2 id="_what_sml_software_has_been_ported_to_mlton">What SML software has been ported to MLton?</h2>
49 <div class="sectionbody">
50 <div class="paragraph"><p><a href="Libraries">Libraries</a></p></div>
51 </div>
52 </div>
53 <div class="sect1">
54 <h2 id="_what_graphical_libraries_are_available_for_mlton">What graphical libraries are available for MLton?</h2>
55 <div class="sectionbody">
56 <div class="paragraph"><p><a href="Libraries">Libraries</a></p></div>
57 </div>
58 </div>
59 <div class="sect1">
60 <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>
61 <div class="sectionbody">
62 <div class="paragraph"><p>MLton has <a href="Performance">excellent performance</a>.</p></div>
63 </div>
64 </div>
65 <div class="sect1">
66 <h2 id="_does_mlton_treat_monomorphic_arrays_and_vectors_specially">Does MLton treat monomorphic arrays and vectors specially?</h2>
67 <div class="sectionbody">
68 <div class="paragraph"><p>MLton implements monomorphic arrays and vectors (e.g. <span class="monospaced">BoolArray</span>,
69 <span class="monospaced">Word8Vector</span>) exactly as instantiations of their polymorphic
70 counterpart (e.g. <span class="monospaced">bool array</span>, <span class="monospaced">Word8.word vector</span>). Thus, there is
71 no need to use the monomorphic versions except when required to
72 interface with the <a href="BasisLibrary">Basis Library</a> or for portability
73 with other SML implementations.</p></div>
74 </div>
75 </div>
76 <div class="sect1">
77 <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>
78 <div class="sectionbody">
79 <div class="paragraph"><p><a href="GnuMP">GnuMP</a></p></div>
80 </div>
81 </div>
82 <div class="sect1">
83 <h2 id="_how_can_i_decrease_compile_time_memory_usage">How can I decrease compile-time memory usage?</h2>
84 <div class="sectionbody">
85 <div class="ulist"><ul>
86 <li>
87 <p>
88 Compile with <span class="monospaced">-verbose 3</span> to find out if the problem is due to an
89 SSA optimization pass. If so, compile with <span class="monospaced">-disable-pass <em>pass</em></span> to
90 skip that pass.
91 </p>
92 </li>
93 <li>
94 <p>
95 Compile with <span class="monospaced">@MLton hash-cons 0.5 --</span>, which will instruct the
96 runtime to hash cons the heap every other GC.
97 </p>
98 </li>
99 <li>
100 <p>
101 Compile with <span class="monospaced">-polyvariance false</span>, which is an undocumented option
102 that causes less code duplication.
103 </p>
104 </li>
105 </ul></div>
106 <div class="paragraph"><p>Also, please <a href="Contact">Contact</a> us to let us know the problem to help us
107 better understand MLton&#8217;s limitations.</p></div>
108 </div>
109 </div>
110 <div class="sect1">
111 <h2 id="_how_portable_is_sml_code_across_sml_compilers">How portable is SML code across SML compilers?</h2>
112 <div class="sectionbody">
113 <div class="paragraph"><p><a href="StandardMLPortability">StandardMLPortability</a></p></div>
114 </div>
115 </div>
116 </div>
117 <div id="footnotes"><hr></div>
118 <div id="footer">
119 <div id="footer-text">
120 </div>
121 <div id="footer-badges">
122 </div>
123 </div>
124 </body>
125 </html>