Permalink
Browse files

update OCaml section

  • Loading branch information...
1 parent 9eee768 commit bfae408e456bc959c32ee09d244a00345b9ce6ae @mzp mzp committed Feb 24, 2013
Showing with 9 additions and 7 deletions.
  1. +9 −7 index.html
View
16 index.html
@@ -343,14 +343,16 @@ <h3 id="crosslang">Implementation projects</h3>
<div id="qs-ocaml" class="qs">
<h4>OCaml</h4>
+ <pre class="prettyprint">$ opam install msgpack</pre>
<pre class="prettyprint">
-$ git clone git@github.com:msgpack/msgpack-ocaml.git
-$ cd msgpack-ocaml
-$ omake
-$ omake install</pre>
- <pre class="prettyprint">
-Msgpack.Serialize.deserialize_string("\147\001\002\003");;
- </pre>
+type t = { ans : int } with conv(msgpack)
+
+let bytes =
+ Msgpack.Serialize.serialize_string
+ (msgpack_of_t { ans = 42 })
+
+let { ans = n } =
+ t_of_msgpack (Msgpack.Serialize.deserialize_string bytes)</pre>
<a href="https://github.com/msgpack/msgpack-ocaml/tree/master/proof">This library is mathematically proven!</a>
</div>

0 comments on commit bfae408

Please sign in to comment.