Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Pickling for OCaml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Markus Mottl <markus.mottl@g...>
Subject: Re: [Caml-list] Pickling for OCaml?
On 1/6/06, Jonathan Roewen <jonathan.roewen@gmail.com> wrote:
> > Will the Marshall module not do?
>
> Marshal is unsafe. Pickling is safe. I'd take pickling =)

You could try our S-expression library, which uses CamlP4 to generate
code for converting arbitrary extensionally defined (= sum and product
types, polymorphic variants, records, types with type variables)
OCaml-types to and from S-expressions:

  http://www.janestcapital.com/ocaml

The library is safe and displays understandable error messages when
parsing S-expressions.  One can choose whether to print values in
human-readable ways or in very compact machine-readable (somewhat
human-readable) form.  It's also very easy to write down OCaml-values
in S-expression syntax, which makes it ideal for complex configuration
files.

Regards,
Markus

--
Markus Mottl        http://www.ocaml.info        markus.mottl@gmail.com