An implementation of a constraint-based type-checker for ML based on “The essence of ML type inference”. This one additionally generates an annotated AST along with extra coercions to generalize variables inside patterns. See my master's thesis report for details.
Shell 0.08%OCaml 41.21%CSS 0.22%TeX 58.49%
chaml's Introduction
ChaML - a type-checker that uses constraints and a kernel language
==================================================================
Requires OCaml 3.12 alpha1 or higher (hint: use SVN branch ocaml-3.12), as well
as ocamlbuild.
Run make to build the executable.
Run make tests to launch the test suite.
Run make clean to clean.
Run make debug to see the constraints contained in test.ml.
Run make debug_ast to run the tool on test.ml and print the various intermediate
languages.
WARNING: you are strongly advised to use a shell with a black background.
WARNING: because ocamlbuild cannot handle menhir and ocamlyacc at the same time,
there is a horrible ./yacchack.sh and ./noyacchack.sh that basically move
OCaml's parser.mly out of the build tree. BE SURE TO RUN MANUALLY
./noyacchack.sh AFTERWARDS IF YOUR BUILD FAILED.
The following folders are imports from the OCaml source tree.
- driver
- parsing
- utils