From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 8EF87BBFB for ; Sun, 19 Jun 2005 17:37:25 +0200 (CEST) Received: from ux9.sp.cs.cmu.edu (UX9.SP.CS.CMU.EDU [128.2.220.166]) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id j5JFbO1o030224 for ; Sun, 19 Jun 2005 17:37:25 +0200 Received: from c-24-3-154-200.hsd1.pa.comcast.net ([24.3.154.200]) by ux9.sp.cs.cmu.edu id aa08338; 19 Jun 2005 11:37 EDT Received: from ecc by stratocaster.home with local (Exim 4.50) id 1Dk1r9-0001vu-GH for caml-list@yquem.inria.fr; Sun, 19 Jun 2005 11:37:07 -0400 Date: Sun, 19 Jun 2005 11:37:07 -0400 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ]Caml-list] Types Message-ID: <20050619153707.GA7411@localhost> Mail-Followup-To: caml-list@yquem.inria.fr References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i From: Eric Cooper X-Miltered: at nez-perce with ID 42B59134.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 caml-list:01 mutable:01 ...:98 wrote:01 polymorphic:01 types:02 let:03 let:03 rect:95 edu:07 seem:07 fun:08 fun:08 jun:09 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Sun, Jun 19, 2005 at 06:42:01PM +1200, Jonathan Roewen wrote: > Is it possible to create a record type that has a member which is a > polymorphic type? > > I tried: type rect = { mutable x1: 'a; ... } but that doesn't work. > Also, type a = A of 'a doesn't seem to work either. type t = { f : 'a . 'a -> 'a list } let x = { f = fun x -> [x] } let y = { f = fun x -> [x;x] } -- Eric Cooper e c c @ c m u . e d u