descriptionEnhancements to OCaml deriving extension
homepage URL
last changeWed, 8 Feb 2012 14:50:51 +0000 (8 16:50 +0200)
content tags

Typing `make' in this directory should build both the preprocessor
(syntax/deriving) and the libraries (lib/deriving.cma,

You can run the tests by changing to the test directory and building
and running the `tests' executable

   $ cd tests
   $ make
   $ ./tests
   Tests succeeded!

There's very limited documentation at present, but you should be able
to get started by looking at the test files.

Any comments are very welcome.

Jeremy Yallop

UPDATE (20100901)

Original deriving at
This code lives at

* fix compilation with ocaml 3.11 [#5]
* fix linking conflict with extlib [#1]
* fix pretty printing of constructors [#4]
* partially fix syntax conflict with operator (<) [#2]
* alternative compilation with ocamlbuild, producing pa_deriving.cma
* installation with ocamlfind

Build with ocamlbuild :
    $ make obuild

Result (in directory _build) :
    deriving.{cma,cmxa} - runtime library for deriving
    pa_deriving.cma - syntax extension library (usage: camlp4o _build/pa_deriving.cma tests/
    deriving.{byte,native} - syntax extension standalone binary (usage: _build/deriving.native tests/

Original build procedure works too, but you will not get pa_deriving.cma

Build tests :
    $ ocamlbuild tests.native

Install with ocamlfind :
    $ make install

Example usage with ocamlfind :
    $ ocamlfind ocamlopt -o test -linkpkg -package deriving.syntax -syntax camlp4o tests/

Example usage in ocaml toplevel :
    #use "topfind";;
    #require "deriving.syntax";;
    type t = int list deriving (Show);;<t>([1;2;3;4]);;

2012-02-08 ygrekbuild with ocamlbuild by defaultmaster
2011-02-26 ygreksilence warning
2011-02-26 ygrekrevised syntax in quotations - supports ocaml 3.12
2010-09-01 ygrektweak META, update README
2010-05-27 ygrekREADME: add toplevel usage example
2010-02-22 ygrekrefine META
2010-02-17 ygrekfix META, add ocamlfind usage example in README
2010-02-17 ygrekinstall with ocamlfind
2010-02-17 ygrekcorrectly build everything with ocamlbuild
2010-02-08 ygreksimplify, do not use ocamlfind for building
2010-02-08 ygrekfix to compile
2010-02-08 ygrekcompile with ocamlbuild (by Romain Slootmaekers)
2010-01-08 ygrekminor tweak
2010-01-08 ygrekMerge branch 'issue2'
2010-01-08 ygrek.gitignore
2010-01-08 ygrekfix to compile
7 years ago 0.1.1a
5 years ago master