From: Jonathan Roewen <jonathan.roewen@gmail.com>
To: Mark Shinwell <Mark.Shinwell@cl.cam.ac.uk>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Pickling for OCaml?
Date: Wed, 11 Jan 2006 17:48:42 +1300 [thread overview]
Message-ID: <ad8cfe7e0601102048i7b4c79e7ha2dece58cf470ade@mail.gmail.com> (raw)
In-Reply-To: <20060106160207.GK5470@three-tuns.net>
> > Marshalling and "pickling" are synonyms. The Marshal module does not
> > provide runtime checks, yet, but the Caml team is working at it, as far as
> > I know.
>
> Myself and others at Cambridge, headed by Peter Sewell, are working on
> type- and abstraction-safe marshalling for O'Caml that works even where
> values to be marshalled are passed through polymorphic functions.
> Expect to hear more later this year.
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
next prev parent reply other threads:[~2006-01-11 4:48 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 [this message]
2006-01-11 4:50 ` Jonathan Roewen
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=ad8cfe7e0601102048i7b4c79e7ha2dece58cf470ade@mail.gmail.com \
--to=jonathan.roewen@gmail.com \
--cc=Mark.Shinwell@cl.cam.ac.uk \
--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