[Pkg-ocaml-maint-commits] [SCM] bin-prot packaging branch, master, updated. 8a3bbf145731ad3eadc6589dec3ccb5bdbc97129
Stefano Zacchiroli
zack at upsilon.cc
Sat May 3 18:09:54 UTC 2008
The following commit has been merged in the master branch:
commit 8a3bbf145731ad3eadc6589dec3ccb5bdbc97129
Author: Stefano Zacchiroli <zack at upsilon.cc>
Date: Sat May 3 19:55:15 2008 +0200
add usage notes in README.Debian
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..ba52071
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,43 @@
+Syntax extension usage
+======================
+
+The easiest way to use bin-prot syntax extension is via findlib.
+
+To compile sources which are using it invoke findlib passing "-syntax camlp4o"
+and providing the "bin_prot.syntax" package. For example:
+
+ $ cat foo.ml
+ TYPE_CONV_PATH "Foo"
+ type foo = Foo with bin_io
+
+ $ ocamlfind ocamlc -linkpkg -package bin_prot.syntax -syntax camlp4o -o foo foo.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 "bin_prot.syntax";;
+ <snip>
+ /usr/local/lib/ocaml/3.10.1/type-conv/pa_type_conv.cmo: loaded
+ /usr/lib/ocaml/3.10.1/bin_prot/pa_bin_prot.cmo: loaded
+
+ # type foo = Foo with bin_io;;
+ type foo = Foo
+ val bin_read_foo__ : 'a -> 'b -> 'c -> 'd = <fun>
+ val bin_read_foo_ :
+ Bin_prot.Unsafe_common.sptr_ptr -> Bin_prot.Unsafe_common.eptr -> foo =
+ <fun>
+ val bin_read_foo :
+ Bin_prot.Common.buf -> pos_ref:Bin_prot.Common.pos ref -> foo = <fun>
+
--
bin-prot packaging
More information about the Pkg-ocaml-maint-commits
mailing list