descriptionEnhancements to OCaml deriving extension
homepage URLhttp://code.google.com/p/deriving/
ownerygrek@autistici.org
last changeWed, 8 Feb 2012 14:50:51 +0000 (8 16:50 +0200)
content tags
add:
README
SEE BELOW FOR UPDATE
--------------------------------------------------------------

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

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
jeremy.yallop@ed.ac.uk

--------------------------------------------------------------
UPDATE (20100901)

Original deriving at http://code.google.com/p/deriving
This code lives at http://repo.or.cz/w/deriving.git

Changes:
* 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/issue2.ml)
    deriving.{byte,native} - syntax extension standalone binary (usage: _build/deriving.native tests/issue2.ml)

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/issue2.ml

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

--
ygrek
ygrek@autistici.org
shortlog
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 enum_tests.ml to compile
...
tags
7 years ago 0.1.1a
heads
5 years ago master