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 PAA03580; Tue, 18 Dec 2001 15:38:37 +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 PAA03390 for ; Tue, 18 Dec 2001 15:38:36 +0100 (MET) Received: from draco ([62.30.67.37]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id fBIEcZH17166 for ; Tue, 18 Dec 2001 15:38:36 +0100 (MET) Received: from jim by draco with local (Exim 3.32 #1 (Debian)) id 16GLMu-0005qz-00 for ; Tue, 18 Dec 2001 14:37:20 +0000 Content-Type: text/plain; charset="iso-8859-1" From: Jim Farrand Message-Id: <200112181411.30786@farrand.net> To: caml-list@pauillac.inria.fr Subject: [Caml-list] Polymorphic Variants and Objects Date: Tue, 18 Dec 2001 14:37:19 +0000 X-Mailer: KMail [version 1.3.2] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Take a look at the following OCaml class type definition: class type foo = object method bar: [ `A | `B ] end I want to be able to relax the type of bar so that it can return any variant tag, rather than being limited to `A or `B. Is this possible? I tried class type foo = object method bar: [> ] end but this is rejected on the grounds that The method bar has type [> ] where .. is unbound Any suggestions? Regards, Jim ------------------- 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