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 XAA01805; Mon, 28 Jun 2004 23:02:31 +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 XAA01778 for ; Mon, 28 Jun 2004 23:02:30 +0200 (MET DST) Received: from mproxy.gmail.com (mproxy.gmail.com [216.239.56.244]) by concorde.inria.fr (8.12.10/8.12.10) with SMTP id i5SL2SSH010794 for ; Mon, 28 Jun 2004 23:02:29 +0200 Received: by mproxy.gmail.com with SMTP id w41so2455484cwb for ; Mon, 28 Jun 2004 14:02:25 -0700 (PDT) Received: by 10.11.118.24 with SMTP id q24mr1195736cwc; Mon, 28 Jun 2004 14:02:25 -0700 (PDT) Message-ID: Date: Mon, 28 Jun 2004 23:02:25 +0200 From: henri dubois-ferriere To: caml-list@inria.fr Subject: [Caml-list] marshalling polymorphic variants Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 40E08764.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; henridf:01 marshalling:01 counted:01 val:01 variants:01 polymorphic:01 marshal:01 marshal:01 unit:03 henri:03 henri:03 behavior:03 let:04 channel:06 channel:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk hi, in the simple case below, it is possible to marshal out a ([`A | `B] list), and then read it back as a [> `A | `B | `C] list. can this behavior be counted on , or is it not something an application can assume to always work? thanks henri # Marshal.to_channel oc ([`A; `B] : [`A | `B] list) [];; - : unit = () # let a = (Marshal.from_channel ic : [> `A| `B | `C] list);; val a : [> `A | `B | `C ] list = [`A; `B] ------------------- 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