4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>CKitLibrary</title>
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
19 <body class="article">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
30 <div class="sectionbody">
31 <div class="paragraph"><p>The <a href="http://www.smlnj.org/doc/ckit">ckit Library</a> is a C front end
32 written in SML that translates C source code (after preprocessing)
33 into abstract syntax represented as a set of SML datatypes. The ckit
34 Library is distributed with SML/NJ. Due to differences between SML/NJ
35 and MLton, this library will not work out-of-the box with MLton.</p></div>
36 <div class="paragraph"><p>As of 20180119, MLton includes a port of the ckit Library synchronized
37 with SML/NJ version 110.82.</p></div>
41 <h2 id="_usage">Usage</h2>
42 <div class="sectionbody">
43 <div class="ulist"><ul>
46 You can import the ckit Library into an MLB file with:
48 <table class="tableblock frame-all grid-all"
52 <col style="width:50%;">
53 <col style="width:50%;">
56 <th class="tableblock halign-left valign-top" >MLB file</th>
57 <th class="tableblock halign-left valign-top" >Description</th>
62 <td class="tableblock halign-left valign-top" ><p class="tableblock"><span class="monospaced">$(SML_LIB)/ckit-lib/ckit-lib.mlb</span></p></td>
63 <td class="tableblock halign-left valign-top" ><p class="tableblock"></p></td>
70 If you are porting a project from SML/NJ’s <a href="CompilationManager">CompilationManager</a> to
71 MLton’s <a href="MLBasis"> ML Basis system</a> using <span class="monospaced">cm2mlb</span>, note that the
72 following map is included by default:
74 <div class="listingblock">
75 <div class="content monospaced">
77 $ckit-lib.cm $(SML_LIB)/ckit-lib
78 $ckit-lib.cm/ckit-lib.cm $(SML_LIB)/ckit-lib/ckit-lib.mlb</pre>
80 <div class="paragraph"><p>This will automatically convert a <span class="monospaced">$/ckit-lib.cm</span> import in an input
81 <span class="monospaced">.cm</span> file into a <span class="monospaced">$(SML_LIB)/ckit-lib/ckit-lib.mlb</span> import in the
82 output <span class="monospaced">.mlb</span> file.</p></div>
88 <h2 id="_details">Details</h2>
89 <div class="sectionbody">
90 <div class="paragraph"><p>The following changes were made to the ckit Library, in addition to
91 deriving the <span class="monospaced">.mlb</span> file from the <span class="monospaced">.cm</span> file:</p></div>
92 <div class="ulist"><ul>
95 <span class="monospaced">ast/pp/pp-ast-adornment-sig.sml</span> (modified): Rewrote use of <span class="monospaced">signature</span> in <span class="monospaced">local</span>.
100 <span class="monospaced">ast/pp/pp-ast-ext-sig.sml</span> (modified): Rewrote use of <span class="monospaced">signature</span> in <span class="monospaced">local</span>.
105 <span class="monospaced">ast/type-util-sig.sml</span> (modified): Rewrote use of <span class="monospaced">signature</span> in <span class="monospaced">local</span>.
110 <span class="monospaced">parser/parse-tree-sig.sml</span> (modified): Rewrote use of (sequential) <span class="monospaced">withtype</span> in signature.
115 <span class="monospaced">parser/parse-tree.sml</span> (modified): Rewrote use of (sequential) <span class="monospaced">withtype</span>.
122 <h2 id="_patch">Patch</h2>
123 <div class="sectionbody">
124 <div class="ulist"><ul>
127 <a href="https://github.com/MLton/mlton/blob/master/lib/ckit-lib/ckit.patch"><span class="monospaced">ckit.patch</span></a>
134 <div id="footnotes"><hr></div>
136 <div id="footer-text">
138 <div id="footer-badges">