Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
General-purpose extensions to OCaml pattern-matching facilities
branch: master

cleanup alist

latest commit a4335b3802
Jake Donham authored
Failed to load latest commit information.
applications cleanup alist
CHANGES patterns 0.4
COPYING patterns 0.4
Makefile patterns 0.4
README patterns 0.4
VERSION patterns 0.4 split ors in PaOlbi for benefit of alist 3.12.0 support


Note: you'll need OCaml 3.10.x to compile `patterns'.

Typing `make' in this directory should build object files traverse.cmo
and patterns.cmo, which form a framework for writing extensions to
pattern-matching using Camlp4.  Typing `make' in the applications
directory then builds a number of extensions which use the framework
to extend OCaml pattern matching.

For example, once you've built the framework and the applications, you
can use the pa_lazy extension in applications/lazy to extend OCaml
with "lazy patterns" (i.e. pattern matching against lazy values).  If
you have a source file "" which uses lazy patterns then you
can compile it as follows:

   ocamlc -pp 'camlp4of traverse.cmo patterns.cmo pa_lazy.cmo'

or, to see the output,

   camlp4of traverse.cmo patterns.cmo pa_lazy.cmo

If you'd like to check that everything is working, you can run 

   make test

in the applications directory.

Documentation for using `patterns' is available at

Comments are very welcome.

Jeremy Yallop
Something went wrong with that request. Please try again.