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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id AD5E2BC57 for ; Fri, 8 Oct 2010 15:48:38 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AngBAGa+rkyGnQCBlGdsb2JhbACDH5B1jisVAQEBAQkLCAkRAx+pRpJGgSKDMXQEhQmIOQ X-IronPort-AV: E=Sophos;i="4.57,302,1283724000"; d="scan'208";a="60789141" Received: from shiva.jussieu.fr ([134.157.0.129]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Oct 2010 15:48:38 +0200 Received: from hydrogene.pps.jussieu.fr (hydrogene.pps.jussieu.fr [134.157.168.1]) by shiva.jussieu.fr (8.14.4/jtpda-5.4) with ESMTP id o98DmaSD026318 ; Fri, 8 Oct 2010 15:48:37 +0200 (CEST) X-Ids:165 Received: from [134.157.168.107] (bohrium.pps.jussieu.fr [134.157.168.107]) by hydrogene.pps.jussieu.fr (8.13.4/jtpda-5.4) with ESMTP id o98DmYi0014022 ; Fri, 8 Oct 2010 15:48:34 +0200 Subject: Re: [Caml-list] Marshalling question From: Mathias Kende To: Jean Krivine Cc: caml users In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Fri, 08 Oct 2010 15:48:06 +0200 Message-ID: <1286545686.19478.40.camel@bohrium.pps.jussieu.fr> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 8bit X-Miltered: at jchkmail.jussieu.fr with ID 4CAF2134.005 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Enveloppe: 4CAF2134.005/134.157.168.1/hydrogene.pps.jussieu.fr/hydrogene.pps.jussieu.fr/ X-Spam: no; 0.00; marshalling:01 0200,:01 krivine:01 ocaml:01 arrays:01 hashtbl:01 hashtbl:01 beginner's:01 ocaml:01 bug:01 mathias:98 mathias:98 beginners:01 exception:01 caml-list:01 Le vendredi 08 octobre 2010 à 15:37 +0200, Jean Krivine a écrit : > Dear ocaml users, > > A simple question: is it safe to marshalize a data structure that > contains imperative elements (like arrays or hashtbl) ? It's relatively safe to do so. The only thing is that if it is unmarshalled in the process where it was marshalled you will still and up with a new array or hashtbl. Exception are some complex datastructure which may require additional care when marshalled. An example of which are the graphs of the ocamlgraph library (even the functional one), but there is none in the standard library. > I found the documentation of the Marshal module rather obscure to me. > In particular it is not clear whether I should use the No_sharing > flag. This flag is never needed but there is cases where it is mandatory *not* to use it (with cyclic data). Mathias > > Thank you! > J > > _______________________________________________ > 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