Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / CKitLibrary.adoc
CommitLineData
7f918cf1
CE
1CKitLibrary
2===========
3
4The http://www.smlnj.org/doc/ckit[ckit Library] is a C front end
5written in SML that translates C source code (after preprocessing)
6into abstract syntax represented as a set of SML datatypes. The ckit
7Library is distributed with SML/NJ. Due to differences between SML/NJ
8and MLton, this library will not work out-of-the box with MLton.
9
10As of 20180119, MLton includes a port of the ckit Library synchronized
11with SML/NJ version 110.82.
12
13== Usage ==
14
15* You can import the ckit Library into an MLB file with:
16+
17[options="header"]
18|=====
19|MLB file|Description
20|`$(SML_LIB)/ckit-lib/ckit-lib.mlb`|
21|=====
22
23* If you are porting a project from SML/NJ's <:CompilationManager:> to
24MLton's <:MLBasis: ML Basis system> using `cm2mlb`, note that the
25following map is included by default:
26+
27----
28# ckit Library
29$ckit-lib.cm $(SML_LIB)/ckit-lib
30$ckit-lib.cm/ckit-lib.cm $(SML_LIB)/ckit-lib/ckit-lib.mlb
31----
32+
33This will automatically convert a `$/ckit-lib.cm` import in an input
34`.cm` file into a `$(SML_LIB)/ckit-lib/ckit-lib.mlb` import in the
35output `.mlb` file.
36
37== Details ==
38
39The following changes were made to the ckit Library, in addition to
40deriving the `.mlb` file from the `.cm` file:
41
42* `ast/pp/pp-ast-adornment-sig.sml` (modified): Rewrote use of `signature` in `local`.
43* `ast/pp/pp-ast-ext-sig.sml` (modified): Rewrote use of `signature` in `local`.
44* `ast/type-util-sig.sml` (modified): Rewrote use of `signature` in `local`.
45* `parser/parse-tree-sig.sml` (modified): Rewrote use of (sequential) `withtype` in signature.
46* `parser/parse-tree.sml` (modified): Rewrote use of (sequential) `withtype`.
47
48== Patch ==
49
50* <!ViewGitFile(mlton,master,lib/ckit-lib/ckit.patch)>