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 TAA32304; Wed, 9 Jan 2002 19:28:10 +0100 (MET) 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 TAA32106 for ; Wed, 9 Jan 2002 19:28:09 +0100 (MET) Received: from mail5.uts.ohio-state.edu (mail5.uts.ohio-state.edu [128.146.214.34]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g09IS8j02515 for ; Wed, 9 Jan 2002 19:28:08 +0100 (MET) Received: from functor.resnet.ohio-state.edu (rpat-100-139.resnet.ohio-state.edu [164.107.100.139]) by mail5.uts.ohio-state.edu (8.9.3/8.9.3) with ESMTP id NAA25884; Wed, 9 Jan 2002 13:28:05 -0500 (EST) Received: by functor.resnet.ohio-state.edu (Postfix, from userid 1001) id 889DA112F5; Wed, 9 Jan 2002 13:02:33 -0500 (EST) Date: Wed, 9 Jan 2002 13:02:33 -0500 From: Jeremy Fincher To: Boris Yakobowski Cc: caml-list@inria.fr Subject: Re: [Caml-list] Nested classes and types Message-ID: <20020109130233.A14455@functor.resnet.ohio-state.edu> References: <000201c1992d$b4f0e9f0$a7804d8c@prometheus> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <000201c1992d$b4f0e9f0$a7804d8c@prometheus>; from Boris.Yakobowski@ens-lyon.fr on Wed, Jan 09, 2002 at 05:50:12PM +0100 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk You have to use the "parameterization trick" since syntax doesn't work. > Example : > > class type c_foo = > object > val val_foo : t_foo > end > and > t_foo = Foo of c_foo type 'a _t_foo = Foo of 'a class type c_foo = object val val_foo : c_foo _t_foo end type t_foo = c_foo _t_foo That'll get you a type t_foo that does what you want. Jeremy ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr