3 --------------------------------------------------------------
5 Typing `make' in this directory should build both the preprocessor
6 (syntax/deriving) and the libraries (lib/deriving.cma,
9 You can run the tests by changing to the test directory and building
10 and running the `tests' executable
18 There's very limited documentation at present, but you should be able
19 to get started by looking at the test files.
21 Any comments are very welcome.
24 jeremy.yallop@ed.ac.uk
26 --------------------------------------------------------------
29 Original deriving at http://code.google.com/p/deriving
30 This code lives at http://repo.or.cz/w/deriving.git
33 * fix compilation with ocaml 3.11 [#5]
34 * fix linking conflict with extlib [#1]
35 * fix pretty printing of constructors [#4]
36 * partially fix syntax conflict with operator (<) [#2]
37 * alternative compilation with ocamlbuild, producing pa_deriving.cma
38 * installation with ocamlfind
40 Build with ocamlbuild :
43 Result (in directory _build) :
44 deriving.{cma,cmxa} - runtime library for deriving
45 pa_deriving.cma - syntax extension library (usage: camlp4o _build/pa_deriving.cma tests/issue2.ml)
46 deriving.{byte,native} - syntax extension standalone binary (usage: _build/deriving.native tests/issue2.ml)
48 Original build procedure works too, but you will not get pa_deriving.cma
51 $ ocamlbuild tests.native
53 Install with ocamlfind :
56 Example usage with ocamlfind :
57 $ ocamlfind ocamlopt -o test -linkpkg -package deriving.syntax -syntax camlp4o tests/issue2.ml
59 Example usage in ocaml toplevel :
62 #require "deriving.syntax";;
63 type t = int list deriving (Show);;
64 Show.show<t>([1;2;3;4]);;