From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id E6E28BB84 for ; Wed, 28 Jun 2006 23:05:38 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k5SL5dfg029627 for ; Wed, 28 Jun 2006 23:05:39 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA26314 for ; Wed, 28 Jun 2006 23:05:38 +0200 (MET DST) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.192]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k5SL5bqf018361 for ; Wed, 28 Jun 2006 23:05:38 +0200 Received: by nz-out-0102.google.com with SMTP id 13so72852nzp for ; Wed, 28 Jun 2006 14:05:36 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=l/QRG58cBJDhnll5X0nyKF3Ln2tt/Q1uIOBzJjfPiazMd1kxoA6ZiuXemAe5QjmynSPn7RU2SDfCD/IuFMG8nZ+JDxyxPwoHxf/Mt+ZLeaty0L38SJzTYR1tSBylCo8/5iBF+oozWn7jAdPiPRI7E7GiB36cgr17kfnAdc5+kXU= Received: by 10.36.74.5 with SMTP id w5mr1751082nza; Wed, 28 Jun 2006 14:05:36 -0700 (PDT) Received: by 10.36.101.10 with HTTP; Wed, 28 Jun 2006 14:05:36 -0700 (PDT) Message-ID: Date: Thu, 29 Jun 2006 09:05:36 +1200 From: "Jonathan Roewen" To: Michel.Mauny@ensta.fr Subject: Re: [Caml-list] Typing unmarshalling without marshalling types Cc: caml-list@inria.fr, "=?ISO-8859-1?Q?Gr=E9goire_Henry?=" In-Reply-To: <449BB0C6.5040204@ensta.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <449BB0C6.5040204@ensta.fr> X-j-chkmail-Score: MSGID : 44A2EF21.000 on nez-perce : j-chkmail score : X : 0/20 1 X-Miltered: at concorde with ID 44A2EF23.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44A2EF21.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; marshalling:01 odyl:01 cmo:01 bytecode:01 mauny:01 mauny:01 ensta:01 marshalling:01 patched:01 ocaml:01 otherlibs:01 unmarshaling:01 patched:01 ocaml:01 toplevel:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 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 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 worl= d && > 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=E9goire 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 >