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 BAA26158; Tue, 16 Jul 2002 01:09:35 +0200 (MET DST) 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 BAA26168 for ; Tue, 16 Jul 2002 01:09:34 +0200 (MET DST) Received: from tcnwm02.tcn-catv.ne.jp (fw.tcn-catv.ne.jp [61.114.8.229]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g6FN9Wj13044 for ; Tue, 16 Jul 2002 01:09:32 +0200 (MET DST) Received: from [192.168.0.3] by tcnwm02.tcn-catv.ne.jp (8.11.6/8.11.6) with ESMTP id g6FN9Pu25854; Tue, 16 Jul 2002 08:09:25 +0900 (JST) User-Agent: Microsoft-Entourage/10.1.0.2006 Date: Tue, 16 Jul 2002 08:09:38 +0900 Subject: Re: [Caml-list] Deep copy From: Ken Wakita To: Wakita Ken , zze-MARCHEGAY Michael stagiaire FTRD/DTL/LAN , caml-list Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I apology that I sent a silly code fragment last night. I included two mistakes. Small one: the order of arguments to to_string was wrong. it should be: Marshal.from_string (Marshal.to_string obj [Marshal.Closures]) 0 Worse one: it does not work for OO features (sigh). Sorry for disturbance. Ken > From: Ken Wakita > Date: Mon, 15 Jul 2002 22:42:49 +0900 > To: zze-MARCHEGAY Michael stagiaire FTRD/DTL/LAN > , caml-list > Subject: Re: [Caml-list] Deep copy >=20 >=20 > How about the following? >=20 > Marshal.from_string (Marshal.to_string [Marshal.Closures] obj) 0 >=20 > Ken Wakita >=20 >> From: "zze-MARCHEGAY Michael stagiaire FTRD/DTL/LAN" >> >> Date: Mon, 15 Jul 2002 12:06:58 +0200 >> To: >> Subject: [Caml-list] Deep copy >>=20 >> Hi all, >>=20 >> I'm writting a program that manipulates a graph structure and I need to = make >> deep copies of some of the graph nodes. The function Oo.copy donesn't pe= rform >> a deep copy and I haven't found any other that could make it. >>=20 >> Actually, the nodes of my graph are specified using a lot inheritance, a= nd if >> I want to write specific "copy" methods for them, I will need to dispers= e the >> clonning actions downto the leaf of my inheritance tree. >>=20 >> So I'd like to know is there is a clean way to make a deep copy of any >> object. >>=20 >> Thank you. >>=20 >> -- >> Micha=EBl Marchegay, Stagiaire France Telecom R&D du 11/02/2002 au 26/07/2= 002 >> Sous la responsabilit=E9 d'Olivier Dubuisson >> DTL/TAL - 22307 Lannion Cedex - France >> ------------------- >> 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 >=20 > ------------------- > To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inr= ia.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 ------------------- 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