README: add toplevel usage example
[deriving.git] / README
blob12ad3a361bd74fba32640859f607595e088dde5d
1 Typing `make' in this directory should build both the preprocessor
2 (syntax/deriving) and the libraries (lib/deriving.cma,
3 lib/deriving.cmxa).
5 You can run the tests by changing to the test directory and building
6 and running the `tests' executable
8    $ cd tests
9    $ make
10    ...
11    $ ./tests
12    Tests succeeded!
14 There's very limited documentation at present, but you should be able
15 to get started by looking at the test files.
17 Any comments are very welcome.
19 Jeremy Yallop
20 jeremy.yallop@ed.ac.uk
22 Alternatively:
24 Build with ocamlbuild and install with ocamlfind :
25     $ make obuild
26     $ make install
28 Example usage with ocamlfind :
29     $ ocamlfind ocamlopt -o test -linkpkg -package deriving.syntax -syntax camlp4o tests/issue2.ml
31 Example usage in ocaml toplevel :
32     #use "topfind";;
33     #camlp4o;;
34     #require "deriving.syntax";;
35     type t = int list deriving (Show);;
36     Show.show<t>([1;2;3;4]);;