From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id DA213BC69 for ; Sun, 4 Mar 2007 07:02:23 +0100 (CET) Received: from mail.colba.net (mail.colba.net [207.107.221.4]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2462L6Y012083 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sun, 4 Mar 2007 07:02:23 +0100 Received: from [192.168.0.103] (215.84.252.216.dsl1.colba.net [216.252.84.215]) by mail.colba.net (8.12.11/8.12.1) with ESMTP id l2462IKh062532 for ; Sun, 4 Mar 2007 01:02:18 -0500 (EST) Message-ID: <45EA613F.3030104@generation.net> Date: Sun, 04 Mar 2007 01:03:43 -0500 From: Eliot Handelman Reply-To: eliot@generation.net User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: caml Subject: records with polymorphic variants? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 45EA60ED.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; variants:01 syntax:01 foo:01 syntax:01 foo:01 polymorphic:01 polymorphic:01 extensible:01 deprecated:01 int:01 define:01 variant:02 variant:02 i'm:09 i'm:09 Hi, I'm trying to figure out how to define a record with a field whose type is an extensible polymorphic variant. I can this: type f = [ `A of int ] type r = { x : f } but then I can't do this: { x = `B "test" } I'm not even sure if what I'm asking for is possible. Guessing at the syntax I tried type r = { f : [> #foo] } which results in: Warning D: this syntax is deprecated. f : [> #foo] ^^^^ Characters 24-28: f : [> #foo] ^^^^ The type [< foo ] is not a polymorphic variant type I hope it is clear what I'm trying to do. Thanks for your help. -- eliot