The ckit Library is a C front end written in SML that translates C source code (after preprocessing) into abstract syntax represented as a set of SML datatypes. The ckit Library is distributed with SML/NJ. Due to differences between SML/NJ and MLton, this library will not work out-of-the box with MLton.

As of 20180119, MLton includes a port of the ckit Library synchronized with SML/NJ version 110.82.


  • You can import the ckit Library into an MLB file with:

    MLB file Description


  • If you are porting a project from SML/NJ’s CompilationManager to MLton’s ML Basis system using cm2mlb, note that the following map is included by default:

    # ckit Library
    $                            $(SML_LIB)/ckit-lib
    $                $(SML_LIB)/ckit-lib/

    This will automatically convert a $/ import in an input .cm file into a $(SML_LIB)/ckit-lib/ import in the output .mlb file.


The following changes were made to the ckit Library, in addition to deriving the .mlb file from the .cm file:

  • ast/pp/pp-ast-adornment-sig.sml (modified): Rewrote use of signature in local.

  • ast/pp/pp-ast-ext-sig.sml (modified): Rewrote use of signature in local.

  • ast/type-util-sig.sml (modified): Rewrote use of signature in local.

  • parser/parse-tree-sig.sml (modified): Rewrote use of (sequential) withtype in signature.

  • parser/parse-tree.sml (modified): Rewrote use of (sequential) withtype.