Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jonathan Roewen <jonathan.roewen@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Pickling for OCaml?
Date: Wed, 11 Jan 2006 17:50:50 +1300	[thread overview]
Message-ID: <ad8cfe7e0601102050s4a88fd3ald05326db70b7292d@mail.gmail.com> (raw)
In-Reply-To: <ad8cfe7e0601102048i7b4c79e7ha2dece58cf470ade@mail.gmail.com>

Oops, URLs are wrong =(

Files at http://devnulled.ath.cx/svn/dst/trunk/kernel/pickle.ml &
http://devnulled.ath.cx/svn/dst/trunk/kernel/pickle.mli

> Well, in the meantime, we've ported most of the pickling library from
> SML.NET to work with O'Caml. Supports most of the basic types
> (int,bool,char,string,list,array,unit,pairs->sextuples) and a few
> combinators (alttag, wrap, lift,seq).
>
> Fairly easy to define a pickler:
>
> module BytePickle = Pickle.CorePickle(Pickle.ByteCodec)
> open BytePickle
>
> let pickler = pair (string list,int)
>
> let data = pickle pickler (["hello";"world"],-1)
>
> let value = unpickle pickler (List.rev data)
>
> Files at http://devnulled.ath.cx/svn/dst/kernel/pickle.ml &
> http://devnulled.ath.cx/svn/dst/kernel/pickle.mli
>
> Kindest Regards,
>
> Jonathan
>


  reply	other threads:[~2006-01-11  4:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-06  9:59 Jonathan Roewen
2006-01-06 10:16 ` Erik de Castro Lopo
2006-01-06 10:27   ` Jonathan Roewen
2006-01-06 14:30     ` Markus Mottl
2006-01-06 15:36     ` Alessandro Baretta
2006-01-06 16:02       ` Mark Shinwell
2006-01-11  4:48         ` Jonathan Roewen
2006-01-11  4:50           ` Jonathan Roewen [this message]
2006-01-11  8:16           ` Alessandro Baretta
2006-01-06 14:50 ` David MENTRE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad8cfe7e0601102050s4a88fd3ald05326db70b7292d@mail.gmail.com \
    --to=jonathan.roewen@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox