This is the Web appendix to A modular module system, Xavier Leroy, Journal of Functional Programming volume 10 number 3, pages 269--303, 2000.
This appendix contains the complete source code to the modular type-checker for modules described in that article, along with the applications to mini-C and mini-ML mentioned in the article. The code is written in Objective Caml version 2.04.
modules.ml: the type-checker for modules described in section 2 of the paper.
modules.ml.extended: a version of the above with the relaxed typing rule for functor applications described in section 5.5.
miniC.ml: abstract syntax and type-checker for mini-C.
ocamllexlexical analyzer for mini-C.
ocamlyaccparser for mini-C.
miniCmain.ml: driver program for mini-C, typechecks the source given on standard input and prints the inferred types.
example.miniC: an example of mini-C program with structures and functors.
miniML.ml: abstract syntax and type-checker for mini-ML.
ocamllexlexical analyzer for mini-ML.
ocamlyaccparser for mini-ML.
miniMLmain.ml: driver program for mini-ML, typechecks the source given on standard input and prints the inferred types.
example.miniML: an example of mini-ML program with structures and functors.
Makefileand dependency file to build the two applications.
tararchive compressed with
All the files listed above are distributed under the terms of the GNU General Public License version 2.