Version française
Home     About     Download     Resources     Contact us    
Browse thread
Typing unmarshalling without marshalling types
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: Re: [Caml-list] Typing unmarshalling without marshalling types
Hi,

I used your shell script to build it, and mkcamlp4 doesn't want to
play nice (complains that odyl.cmo is not a bytecode object file).

Jonathan

On 6/23/06, Michel Mauny <Michel.Mauny@ensta.fr> wrote:
> Dear all,
>
> We are pleased to announce a patch for Objective Caml that provides
> type safe unmarshalling functions. In short, the main features are:
>
>  - a type for type representations ('a tyrepr, a singleton type)
>
>  - unmarshalling functions like the following:
>
>       SafeUnmarshal.from_string:  'a tyrepr -> string -> int -> 'a
>
> such that
>
>       SafeUnmarshal.from_string ty str off
>
> returns the value whose marshal is the string str (starting at offset
> off) and gives it the type (represented by) ty, if possible. If the
> value cannot be of type ty, the function fails.
>
> For instance,
>
>       SafeUnmarshal.from_string  [^ ( float *  int ) ^] str 0
>
> asks the (memory representation of the) unmarshalled value to be
> compatible with the type (float * int).
>
>  - there is no type information in the marshalled data: marshalling
> functions are not modified by this patch.
>
>  - classical (unsafe) unmarshalling functions are still available.
>
> The easiest way to obtained a patched version of OCaml is to download:
>
>  http://www.pps.jussieu.fr/~henry/marshal/src/make_source_tree.sh
>
> and to execute the following sequence:
>
> ./make_source_tree.sh ocaml-ty && cd ocaml-ty && ./configure && make world &&
> make -C otherlibs/safe_unmarshaling top
>
> The last command of the sequence runs the patched OCaml toplevel.
>
> More information at:
>
>  http://www.pps.jussieu.fr/~henry/marshal/
>
> Have fun,
>
> -- Grégoire Henry and Michel Mauny
>
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>