From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA15375; Mon, 26 Jan 2004 11:19:47 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA15023 for ; Mon, 26 Jan 2004 11:19:46 +0100 (MET) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id i0QAJjP00467 for ; Mon, 26 Jan 2004 11:19:45 +0100 (MET) Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1Al3qL-0000fv-00 for ; Mon, 26 Jan 2004 10:19:45 +0000 Date: Mon, 26 Jan 2004 10:19:45 +0000 Cc: Ocaml Subject: Re: [Caml-list] Marshalling unknown types Message-ID: <20040126101945.GA2500@redhat.com> References: <4014CE35.3000503@baretta.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4014CE35.3000503@baretta.com> User-Agent: Mutt/1.5.4i From: Richard Jones X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 marshalling:01 2004:99 baretta:01 marshalling:01 unmarshal:01 unmarshaling:01 runtime:01 runtime:01 freshmeat:01 ltd:98 alex:01 marshal:01 marshal:01 exception:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Jan 26, 2004 at 09:22:13AM +0100, Alex Baretta wrote: > I can find no reasonable explanation for this behavior. I realize that > exceptions are nasty beasts and that the marshalling functions were not > meant for them, but in this case, the exception is only built and raised > *after* unmarshalling occurs, so I don't see why pattern matching should > fail. IIRC you cannot marshal/unmarshal functions safely. It only works in the limited case where you are unmarshaling in the exact same compiled program. What's needed is for someone to rewrite the marshal code to work safely. However there's not enough type information available at runtime for this to work. eg. [1; 2; 3] looks the same as (1, 2, 3) at runtime. Rich. -- Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj Merjis Ltd. http://www.merjis.com/ - improving website return on investment http://www.YouUnlimited.co.uk/ - management courses ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners