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 LAA18288; Mon, 11 Feb 2002 11:53:09 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA18410 for ; Mon, 11 Feb 2002 11:53:08 +0100 (MET) Received: from mandelbrot.house (host217-35-43-194.in-addr.btopenworld.com [217.35.43.194]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g1BAr7b08063 for ; Mon, 11 Feb 2002 11:53:07 +0100 (MET) Received: by mandelbrot.house (Postfix, from userid 1001) id 4AAE59D; Mon, 11 Feb 2002 10:53:06 +0000 (GMT) Date: Mon, 11 Feb 2002 10:53:06 +0000 From: Ceri Storey To: Ryan Tarpine Cc: caml-list@inria.fr Subject: Re: [Caml-list] Allowing many types Message-ID: <20020211105306.GC11294@mandelbrot.house> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.25i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sun, Feb 10, 2002 at 08:43:20PM -0500, Ryan Tarpine wrote: > Is there a type that means "any polymorphic variant"? Trying to set > type primitive = [ `PTest ] > forces only `PTest to be the value of object_data. How can I allow > anything to be stored there? According to the output of the toplevel, then the type [> `Foo | `Bar ] should be usable, but alas, it is not allowable in type specifictions, giving "Unbound type parameter [..]". I've also tried just using plain tuples for this, but then lots of types become ungeneralisable, eg in the trivial example: # List.map (fun x -> x) [`X; `Y; `Z];; - : _[> `X | `Y | `Z] list = [`X; `Y; `Z] So say, declaring such a variable in a complied module is impossible (AFAIK). Thanks... -- Ceri Storey http://pkl.net/~cez/ vi(1)! postfix(7)! pie(5)! ------------------- 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