<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2002/07/c97184ca9272fc14c7e26e7d28a7f6ca"
  from="Ken Wakita &lt;wakita@i...&gt;"
  author="Ken Wakita"
  date="2002-07-15T23:09:35"
  subject="Re: [Caml-list] Deep copy"
  prev="2002/07/2fe55408b32aa0c8bbfe694c2fc4d83a"
  next="2002/07/ca2a3e0a12658384bdc94c4ad62eb59b"
  prev-in-thread="2002/07/b5f2a4fd55e3a1d98291199ad89dbc71"
  next-in-thread="2002/07/a015dff01822b58f3bda38298a9a737c"
  prev-thread="2002/07/9c344668384b0077ed1732712963cb19"
  next-thread="2002/07/f588263f2499215c76c4696e61086612"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Deep copy">
<msg 
  url="2002/07/a6ba0ce22f3d5db7ef94de3a44da9825"
  from="zze-MARCHEGAY Michael stagiaire FTRD/DTL/LAN &lt;michael.marchegay@r...&gt;"
  author="zze-MARCHEGAY Michael stagiaire FTRD/DTL/LAN"
  date="2002-07-15T10:07:00"
  subject="[Caml-list] Deep copy">
<msg 
  url="2002/07/b11bb354506dff6a9f5ca7d09911a3cf"
  from="Ken Wakita &lt;wakita@i...&gt;"
  author="Ken Wakita"
  date="2002-07-15T13:42:46"
  subject="Re: [Caml-list] Deep copy">
<msg 
  url="2002/07/8e03aea7ddb74b19231e38254700e303"
  from="Eray Ozkural &lt;erayo@c...&gt;"
  author="Eray Ozkural"
  date="2002-07-15T14:49:56"
  subject="Re: [Caml-list] Deep copy">
<msg 
  url="2002/07/b5f2a4fd55e3a1d98291199ad89dbc71"
  from="Ken Wakita &lt;wakita@i...&gt;"
  author="Ken Wakita"
  date="2002-07-15T15:34:11"
  subject="Re: [Caml-list] Deep copy">
</msg>
</msg>
<msg 
  url="2002/07/c97184ca9272fc14c7e26e7d28a7f6ca"
  from="Ken Wakita &lt;wakita@i...&gt;"
  author="Ken Wakita"
  date="2002-07-15T23:09:35"
  subject="Re: [Caml-list] Deep copy">
</msg>
</msg>
<msg 
  url="2002/07/a015dff01822b58f3bda38298a9a737c"
  from="Eray Ozkural &lt;erayo@c...&gt;"
  author="Eray Ozkural"
  date="2002-07-15T15:08:42"
  subject="Re: [Caml-list] Deep copy">
<msg 
  url="2002/07/4f925d88bf549c83906ef318da735378"
  from="Nicolas Cannasse &lt;warplayer@f...&gt;"
  author="Nicolas Cannasse"
  date="2002-07-15T15:28:48"
  subject="Re: [Caml-list] Deep copy">
<msg 
  url="2002/07/25cf95bd60ca67c507865c9452ae232e"
  from="Eray Ozkural &lt;erayo@c...&gt;"
  author="Eray Ozkural"
  date="2002-07-15T15:46:14"
  subject="Re: [Caml-list] Deep copy">
</msg>
</msg>
</msg>
<msg 
  url="2002/07/a26dafef4b887630fd93241adaf9e1e6"
  from="sebastien FURIC &lt;sebastien.furic@t...&gt;"
  author="sebastien FURIC"
  date="2002-07-15T16:23:30"
  subject="Re: [Caml-list] Deep copy">
</msg>
</msg>
</thread>

<contents>

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

&gt; From: Ken Wakita &lt;wakita@is.titech.ac.jp&gt;
&gt; Date: Mon, 15 Jul 2002 22:42:49 +0900
&gt; To: zze-MARCHEGAY Michael stagiaire FTRD/DTL/LAN
&gt; &lt;michael.marchegay@rd.francetelecom.com&gt;, caml-list &lt;caml-list@inria.fr&gt;
&gt; Subject: Re: [Caml-list] Deep copy
&gt; 
&gt; 
&gt; How about the following?
&gt; 
&gt; Marshal.from_string (Marshal.to_string [Marshal.Closures] obj) 0
&gt; 
&gt; Ken Wakita
&gt; 
&gt;&gt; From: "zze-MARCHEGAY Michael stagiaire FTRD/DTL/LAN"
&gt;&gt; &lt;michael.marchegay@rd.francetelecom.com&gt;
&gt;&gt; Date: Mon, 15 Jul 2002 12:06:58 +0200
&gt;&gt; To: &lt;caml-list@inria.fr&gt;
&gt;&gt; Subject: [Caml-list] Deep copy
&gt;&gt; 
&gt;&gt; Hi all,
&gt;&gt; 
&gt;&gt; I'm writting a program that manipulates a graph structure and I need to make
&gt;&gt; deep copies of some of the graph nodes. The function Oo.copy donesn't perform
&gt;&gt; a deep copy and I haven't found any other that could make it.
&gt;&gt; 
&gt;&gt; Actually, the nodes of my graph are specified using a lot inheritance, and if
&gt;&gt; I want to write specific "copy" methods for them, I will need to disperse the
&gt;&gt; clonning actions downto the leaf of my inheritance tree.
&gt;&gt; 
&gt;&gt; So I'd like to know is there is a clean way to make a deep copy of any
&gt;&gt; object.
&gt;&gt; 
&gt;&gt; Thank you.
&gt;&gt; 
&gt;&gt; --
&gt;&gt; Michaël Marchegay, Stagiaire France Telecom R&amp;D du 11/02/2002 au 26/07/2002
&gt;&gt; Sous la responsabilité d'Olivier Dubuisson
&gt;&gt; DTL/TAL - 22307 Lannion Cedex - France
&gt;&gt; -------------------
&gt;&gt; To unsubscribe, mail caml-list-request@inria.fr Archives:
&gt;&gt; http://caml.inria.fr
&gt;&gt; Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ:
&gt;&gt; http://caml.inria.fr/FAQ/
&gt;&gt; Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
&gt; 
&gt; -------------------
&gt; To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
&gt; Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
&gt; 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

</contents>

</message>

