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 MAA07000; Sun, 3 Nov 2002 12:29:49 +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 MAA07472 for ; Sun, 3 Nov 2002 12:29:48 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from kraid.nerim.net (kraid.nerim.net [62.4.16.95]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gA3BTm510382 for ; Sun, 3 Nov 2002 12:29:48 +0100 (MET) Received: from karryall.dnsalias.org (karryall.dnsalias.org [62.4.18.180]) by kraid.nerim.net (Postfix) with ESMTP id DE2BF40F0C; Sun, 3 Nov 2002 12:20:05 +0100 (CET) Received: by karryall.dnsalias.org (Postfix, from userid 500) id 52AED1A0022; Sun, 3 Nov 2002 12:29:47 +0100 (CET) Message-ID: <15813.2219.186024.594555@karryall.dnsalias.org> Date: Sun, 3 Nov 2002 12:29:47 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To: jmarant@nerim.net (=?iso-8859-1?q?J=E9r=F4me?= Marant) Cc: caml-list@inria.fr From: Olivier Andrieu Subject: Re: [Caml-list] Open types and methods In-Reply-To: <87bs57eyib.fsf@marant.org> References: <87bs57eyib.fsf@marant.org> X-Mailer: VM 7.07 under Emacs 21.2.1 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Jérôme Marant [Sunday 3 November 2002] : > > > Hi, > > I know that I cannot use open types as method parameter types, > like: > > method foo (w : #mother) = .... > > So, how can I pass to a method an object of a given class or > of its inherited classes, i.e. how to work this limitation > around? Polymorphic methods ? method foo : 'a. (#mother as 'a) -> ... = fun w -> ... -- Olivier ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners