Open Source
Camlp5
[08-Oct-2012, version
6.07,
Stable]

Camlp5 is a preprocessor-pretty-printer of ocaml.
It is the continuation of the classical Camlp4 with new features.
It is compatible with OCaml versions from 3.08.1 to 3.11 included.
MIT/X11
OSpec
[05-May-2009, version
0.2.0,
Beta]
OSpec is syntax extension and supporting library for Behavior Driven Development in OCaml.
pa_log
[30-Mar-2007,
Stable]

A small camlp4 extension that allows conditional
logging commands with a simple syntax.
pa_macro_arg
[02-Apr-2007,
Development code]

This is an add-on to the standard Pa_macro syntax extension which allows for command-line arguments of the form -DEFuid=expr where uid is an upper-case identifier (a macro name) and expr is an arbitrary OCaml expression.
pa_polyrec
[29-Sep-2009, version
0.1,
Beta]
pa_polyrec is a camlp4 extension providing polymorphic recursion.
xstrp4
[07-Nov-2005, version
1.6,
Stable]
The xstrp4 extension of the camlp4 preprocessor adds the well-known $identifier expansions to Caml.
LGPL
Delimited overloading
[09-Oct-2012, version
0.8.15,
Beta]

Delimited overloading is a syntax extension to ease the writing of efficient arithmetic expressions in OCaml.
Dyn
[05-Nov-2009, version
alpha01,
Development code]
Dyn is a camlp4 syntax extension for Ocaml that
scaffolds injection and projection functions to an from dynamicaly typed values (`dyn`),
reifies ocaml type representation in run-time inspectable values (`dtd`),
provides camlp4 quotations/antiquotations to work with `dyn`s and `dtd`s.
When the `pa_dyn` syntax is loaded it adds a new `type_conv` type processor that
can be called by appending `with dyn` after a type definition (e.g. `type t =
... with dyn`) three values are defined:
val t_of_dyn : Dyn.Data.t -> t,
val dyn_of_t : t -> Dyn.Data.t,
val dtd_of_t : Dyn.DTD.t
Ochra
[02-Nov-2004, version
0.1,
Beta]

Ochra is a syntax extension for OCaml, extending the
language with explicit support for programming using
an Object-Oriented Reference Attributed Grammar (RAG)
formalism.
pa_breakcont
[31-Mar-2008, version
0.12,
Beta]
This project makes use of the Ocaml release 3.10 macro system to add break and continue statements to for and while loops.
The macros implement these statements as exceptions. Since the introduction of the two try/with blocks corresponding (each) to the (separate) break and continue exceptions includes some overhead at run time, the macro adds these try/with blocks sparingly... only if the programmer uses the corresponding statement. For example, the continue statements adds the most overhead since it causes a try/with block to be inserted within a loop. However, code that contains no continue statement will be unaffected by the macro.
pa_monad
[10-Dec-2008, version
6.0,
Stable]
Camlp4 extension for monadic expressions in OCaml.
pa_where
[18-Aug-2008, version
0.4,
Beta]

A camlp4 extension enabling backward declarations. The
"where" keyword, available in the revised syntax, and one of the
truly missed Caml-light friends, is back.
Regexp-OCaml
[24-Mar-2003, version
0.9.3,
Beta]
Regexp/OCaml provides convenient syntax sugar for regular expression match for strings using PCRE/OCaml library.
Sexplib
[17-Apr-2012, version
7.0.5,
Stable]
Library for serializing OCaml values to and from S-expressions.
GPL
CamlTemplate
[31-May-2005, version
1.0,
Stable]


A small template processor library for Objective Caml. It can be used to generate web pages, scripts, SQL queries, XML documents and other sorts of text files.
Hashtbl syntax extension
[30-Jun-2003,
Development code]
Camlp4 syntax extension to get more {easy,perlish} usage of Hashtbl module hash tables.
BSD
Mikmatch
[28-Jul-2008, version
1.0.0,
Beta]

The goal of Micmatch is to make text-oriented programs even easier to write, read and run without losing the unique and powerful features of Objective Caml (OCaml).
Micmatch provides a concise and highly readable syntax for regular expressions, and integrates it into the syntax of OCaml thanks to Camlp4.
Optcomp
[14-Jan-2009, version
1.0,
Stable]

Camlp4 syntax extension for optional compilation with cpp-like directives.
pa_bounds
[13-Mar-2006,
Beta]

A syntax extension which allows out-of-bounds accesses of arrays and alike to be reported with the exact location in the source code.
Others
BER MetaOCaml
[31-Jan-2013, version
100,
Beta]
BER MetaOCaml is a streamlined version of MetaOCaml -- a conservative extension of OCaml with the primitive type of code values, and three basic multi-stage expression forms: Brackets, Escape, and Run.
Coca-ml
[26-Sep-2001, version
0.2,
Alpha]
A small extension to ocaml 3-02 called coca-ml and using camlp4 to allow 'down cast' of objects between classes in relations of inheritance and sub-typing.
Deriving
[07-Sep-2010, version
0.1.2,
Beta]

A system for constructing functions automatically from type definitions.
Dynamic contract checking for OCaml
[04-Jul-2011,
Beta]

A prototype that does dynamic contract checking
for OCaml code. The prototype is built upon the source code of
ocamlc-3.11.2.
Dynaml
[16-Sep-2005, version
0.6,
Alpha]


Dynaml provides rudimentary support for dynamic types in Objective Caml (O'Caml). Dynamic values provided by dynaml are not type checked by ocaml at compile-time in the same way static values are. Type checking is instead performed at runtime.
ECaml
[25-Feb-2004, version
0.3,
Alpha]
A simple object system for OCaml, based on polymorphic variants and a Camlp4 syntax extension.
Enhtop
[05-May-2009, version
3.11.0,
Alpha]

This is an experimental patch (we also provide pre-built testing executable and
Debian package) for an enhanced OCaml toplevel with additional features.
For any kind of bindings (i.e. value, type, module, class etc.):
Identifiers been rebound are shown differently by default, to distinguish with currently effective ones; a new directive to query (by kinds or names or their composition) and show both current and history bindings; a new directive to show the current binding of any identifier without evaluating or rebinding it; a type-check-only testing mode to experiment your definitions without polluting the world, and the directive to enter/leave it.
Fan
[23-Oct-2012,
Development code]
Fan is a full blow programming language, it’s a superset of ocaml with Lisp-like macro’s features. It shares the same run-time with ocaml, so it’s 100% compatible with ocaml.
HashCaml
[27-Apr-2006,
Alpha]

an extension of the OCaml bytecode compiler with support for type-safe marshalling and related naming features. HashCaml builds on earlier work on Acute but is a distinct language design and implementation.
How to customize the syntax of OCaml, using Camlp4
[29-Apr-2005,
Stable]
An individual initiative to provide additional documentation for Camlp4.
Lightweight records
[12-Nov-2002,
Development code]
An extension with camlp4 that allows one to use lightweight records in OCaml.
OCaml-ast-analyze
[19-Apr-2005, version
0.1.1,
Development code]
Ocaml-ast-analyze should provide an abstraction of the structure required to build pr_*.cmo module for camlp4. The idea is to provide a simple way to build Ocaml abstract syntax tree analyzer. This should be particularly useful for string extraction of Ocaml source code.
Ocamlcl
[13-Feb-2002, version
0.3,
Beta]
OCaml with caml light syntax.
openin
[05-Feb-2002, version
2002-02-05,
Beta]
A Camlp4 syntax extension to locally open a module in an expression.
P4ck
[07-Dec-2005, version
0.501,
Beta]

P4ck (read "4-pack") is a utility which downloads, compiles and installs Camlp4 syntax extensions. The motivation for this tool comes from the fact that many people wrote interesting syntax extensions for OCaml, which are in fact quite short and fit in one single file.
pa_arg
[31-Jul-2006, version
0.2.1,
Beta]


CAMLP4 syntax extension offering a special syntax for parsing command-line arguments.
pa_macro
[15-Dec-2003]
Improvements of the pa_macro CamlP4 syntax extension
pa_oo
[19-Oct-2007,
Beta]

Some camlp4 syntax extensions to write more compact code using objects.
pa_polymap
[19-Oct-2007,
Beta]

This is a tiny module combined with a camlp4 extension, which allows you to define polymorphic mappings, where the type of the data depends on the key.
patch_record
[18-Jan-2002,
Stable]
The patch gives a record scoping rule to labels, when accessing (r.l) or modifying a field in a record (r.l <- e); there must be enough type information to know the type of the record.
patterns
[17-Jun-2008, version
0.4,
Beta]

A framework for writing extensions to pattern matching using Camlp4.
Resumable exceptions in plain OCaml
[16-Jun-2006,
Beta]

Resumable exceptions are the strict generalization of regular exceptions,
which lets the exception raising form return a value and so the
computation may continue. It's the exception handler that decides
either to abort the exceptional computation or to resume it with a
particular value. We show a conservative and elementary implementation of resumable
exceptions in OCaml: the implementation is a self-contained 100% pure
OCaml library.
The Whitespace Thing
[17-Jan-2007, version
0.90,
Beta]

"The Whitespace Thing" for OCaml is an alternative syntax that uses indentation rather than parenthesization to group expressions, like in Python and Haskell. This is a controversial feature that some people will always love and some people will always hate. Now, OCaml lets you have it both ways.
Type safe unmarshalling functions
[26-Jun-2006,
Alpha]

A patch for Objective Caml that provides
type safe unmarshalling functions.
Tywith
[14-Mar-2005, version
0.3,
Beta]

Tywith is an OCaml camlp4 parser extension which
derives functions from type definitions. It's
currently capable of generating 'string_of_<type>',
'map_<type>', and 'fold_<type>' functions for alias
and variant types containing tuples and other types
with the appropriate functions defined. Tywith
special-cases built-in types such as list, int, and
string to provide or use the appropriate functions.