Communications and networking
Other protocols
json-static
[05-Feb-2008, version
0.9.6,
Beta]


Json-static is a companion for the json-wheel library.
By reading a type definition, the preprocessor inserts code that converts between OCaml types (lists, arrays, tuples, objects, polymorphic variants, ...) and untyped JSON data. Those type definitions are written in a syntax which is very close to regular OCaml type definitions.
Databases
Macaque
[08-Oct-2012, version
0.6,
Beta]

Macaque (Macros for Caml Queries) is a DSL for OCaml, wich produce SQL requests from a comprehension syntax. Macaque can build queries by from simpler components, using phantom types used to ensure safety.
General purpose libraries
Strings manipulation
Micmatch
[28-Jul-2008, version
1.0.0,
Stable]

Micmatch is a syntax extension of the pattern matching constructs of OCaml for matching and extracting substrings with regular expressions. Micmatch tries to stay as close as possible to the spirit of OCaml. Named regular expressions can be defined. They use the syntax of ocamllex with some additions. This extension is for Camlp5.
Lexing and parsing
Ostap
[04-May-2006, version
0.1,
Beta]

Ostap is an OCaml module to provide a set of parser combinators. The name of this library originates from Ostap Bender --- the central character of Ilya Ilf and Eugene Petrov's comedy "The Twelve Chairs". Bender is generally referred to as "The Great Combinator" since the word "combinator" in Russian also means "a swindler", "a sly man" etc.
Additionally to the common set of parser combinators Ostap provides a camlp4 syntax extension pa_ostap.cmo to embed grammar expressions written in BNF-like style into OCaml code. Another feature of pa_ostap is that it allows to consider streams as objects and so makes integration of lexers and parsers simpler. Please have a look at the documentation for details.
Data structures
Bindlib
[05-Oct-2006, version
3.0,
Stable]

Bindlib is a library and a camlp4 syntax extension for the OCaml language. It proposes a set of tools to manage data structures with bound and free variables. It includes fast substitution and management of variables names including renaming.
Bitstring
[25-Jan-2010, version
2.0.2,
Stable]
The ocaml-bitstring project adds Erlang-style bitstrings and matching over bitstrings as a syntax extension and library for OCaml.
(This project was formerly known as "bitmatch").
You can use this module to both parse and generate binary formats, files and protocols.
Bitstring handling is added as primitives to the language, making it exceptionally simple to use and very powerful.
Col
[27-Apr-2006,
Beta]

This package provides a syntax extension for easier manipulation of flat records, objects or tuples and conversions from/to CSV files for your favorite spreadsheet or plotting program.
Programming languages
Typing
Memcheck
[20-Dec-2006,
Alpha]
A module for runtime type checking in Ocaml.
Memcheck is very similar to SafeUnmarshal but without a few of SafeUnmarshal's limitations. In particular, with Memcheck it only takes seconds to check a few megabytes instead of hours as with
SafeUnmarshal.
Publishing
HereDoc
[09-Aug-2001, version
2000-12-20,
Stable]

Syntactic sugar for text producing applications.
Software development
Language extensions
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.
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
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.
Hashtbl syntax extension
[30-Jun-2003,
Development code]
Camlp4 syntax extension to get more {easy,perlish} usage of Hashtbl module hash tables.
Lightweight records
[12-Nov-2002,
Development code]
An extension with camlp4 that allows one to use lightweight records in OCaml.
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.
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.
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.
openin
[05-Feb-2002, version
2002-02-05,
Beta]
A Camlp4 syntax extension to locally open a module in an expression.
Optcomp
[14-Jan-2009, version
1.0,
Stable]

Camlp4 syntax extension for optional compilation with cpp-like directives.
OSpec
[05-May-2009, version
0.2.0,
Beta]
OSpec is syntax extension and supporting library for Behavior Driven Development in OCaml.
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.
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_log
[30-Mar-2007,
Stable]

A small camlp4 extension that allows conditional
logging commands with a simple syntax.
pa_macro
[15-Dec-2003]
Improvements of the pa_macro CamlP4 syntax extension
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_monad
[10-Dec-2008, version
6.0,
Stable]
Camlp4 extension for monadic expressions in OCaml.
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.
pa_polyrec
[29-Sep-2009, version
0.1,
Beta]
pa_polyrec is a camlp4 extension providing polymorphic recursion.
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.
patterns
[17-Jun-2008, version
0.4,
Beta]

A framework for writing extensions to pattern matching using Camlp4.
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.
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.
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.
xstrp4
[07-Nov-2005, version
1.6,
Stable]
The xstrp4 extension of the camlp4 preprocessor adds the well-known $identifier expansions to Caml.
Code generators
Camlmix
[26-Jan-2006, version
1.3,
Stable]

Camlmix is a generic preprocessor which converts text with embedded OCaml into an OCaml program with embedded text. It produces text documents from one or several templates.
Deriving
[07-Sep-2010, version
0.1.2,
Beta]

A system for constructing functions automatically from type definitions.
User interfaces
Command line
pa_arg
[31-Jul-2006, version
0.2.1,
Beta]


CAMLP4 syntax extension offering a special syntax for parsing command-line arguments.
XML
IoXML
[01-Feb-2002, version
0.6,
Beta]
IoXML allows defining XML parsers and pretty-printers directly from data type definitions.
Parsers and pretty-printers
OX
[06-Oct-2003, version
0.1,
Beta]

OX is an XML integration into Objective-Caml, providing XML transducers based on pseudo-tree view. This gives a homogeneous view of XML within OCaml code, and lets users to manipulate such terms like any other ones, without constraint.
Xmllexer
[21-Nov-2002, version
20021121,
Beta]
xmllexer is an XML lexer for Camlp4. It is composed of one OCaml file (in revised syntax). xmllexer.ml is derived from the default lexer of Camlp4: plexer.ml (written by Daniel de Rauglaudre).
(X)HTML
CaSS
[24-Nov-2010,
Development code]
A CSS quotation mechanism for ocaml using camlp4.
Htcaml
[24-Nov-2010,
Development code]

HTCaML enables the embedding of XHTML fragments in your OCaml program
(the EDSL translates directly to Xmlm) using quotations. It also allows
you to auto-generate boilerplate XHTML fragments from type definitions.
Others
DBC
[10-May-2002, version
1.0.0,
Beta]
Simple design-by-contract support using camlp4.