[Pkg-ocaml-maint-commits] [SCM] sexplib310 packaging branch, master, updated. b88389952280ee1429846fba274682019e385b60
Stefano Zacchiroli
zack at upsilon.cc
Sat May 3 15:34:46 UTC 2008
The following commit has been merged in the master branch:
commit b88389952280ee1429846fba274682019e385b60
Author: Stefano Zacchiroli <zack at upsilon.cc>
Date: Sat May 3 17:04:48 2008 +0200
mini howto for the syntax extension
diff --git a/debian/README.Debian b/debian/README.Debian
index 0482dc1..1c31713 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -1,8 +1,43 @@
-Sexplib for Debian
-==================
+Syntax extension usage
+======================
+
+The easiest way to use Sexplib syntax extension is via findlib.
+
+To compile sources which are using it invoke findlib passing "-syntax camlp4o"
+and providing the "sexplib.syntax" package. For example:
+
+ /tmp$ cp /usr/share/doc/libsexplib-camlp4-dev/examples/conv_test.ml /tmp
+ /tmp$ ocamlfind ocamlc -linkpkg -package sexplib.syntax -syntax camlp4o -o conv_test conv_test.ml
+
+Similarly, to try the syntax extension in the toplevel:
+
+ $ ledit ocaml
+ Objective Caml version 3.10.1
+
+ # #use "topfind";;
+ - : unit = ()
+ Findlib has been successfully loaded. Additional directives:
+ <snip>
+
+ # #camlp4o;;
+ /usr/lib/ocaml/3.10.1/camlp4: added to search path
+ /usr/lib/ocaml/3.10.1/camlp4/camlp4o.cma: loaded
+ Camlp4 Parsing version 3.10.1
+
+ # #require "sexplib.syntax";;
+ <snip>
+ /usr/local/lib/ocaml/3.10.1/type-conv/pa_type_conv.cmo: loaded
+ /usr/lib/ocaml/3.10.1/sexplib/pa_sexp_conv.cmo: loaded
+
+ # type foo = Foo with sexp;;
+ type foo = Foo
+ val foo_of_sexp__ : Sexplib.Sexp.t -> foo = <fun>
+ val foo_of_sexp : Sexplib.Sexp.t -> foo = <fun>
+ val sexp_of_foo : foo -> Sexplib.Sexp.t = <fun>
+
OCaml 3.10
-----------
+==========
The only series of Sexplib supported in Debian is that for OCaml 3.10 or above,
and the matching new CamlP4. If you want a Sexplib for OCaml << 3.10 you will
--
sexplib310 packaging
More information about the Pkg-ocaml-maint-commits
mailing list