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 TAA27702; Thu, 19 Jun 2003 19:43:54 +0200 (MET DST) 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 TAA27803 for ; Thu, 19 Jun 2003 19:43:53 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from smtp01.cp.tin.it (vsmtp0.virgilio.it [212.216.176.136] (may be forged)) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h5JHhqH15395 for ; Thu, 19 Jun 2003 19:43:52 +0200 (MET DST) Received: from vsmtp8.tin.it (212.216.176.235) by smtp01.cp.tin.it (6.7.016) id 3EDFBB5D002C3371 for caml-list@inria.fr; Thu, 19 Jun 2003 19:43:51 +0200 Received: from furia (80.181.166.29) by vsmtp8.tin.it (6.7.016) id 3EE9A1BD00A8462C for caml-list@inria.fr; Thu, 19 Jun 2003 19:43:51 +0200 Received: from localhost ([127.0.0.1] helo=furia) by furia with smtp (Exim 3.35 #1 (Debian)) id 19T3Ty-00060v-00 for ; Thu, 19 Jun 2003 19:45:58 +0200 Date: Thu, 19 Jun 2003 19:45:57 +0200 From: Nick Name To: caml-list@inria.fr Subject: [Caml-list] Mutually recursive types and classes Message-Id: <20030619194557.0b5265bb.nick.name@inwind.it> X-Mailer: Sylpheed version 0.7.4claws (GTK+ 1.2.10; i386-debian-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; inherit:01 unit:03 classes:03 recursive:03 object:03 types:03 type:07 mutually:07 function:09 declaration:09 wish:89 nick:10 between:12 keyword:13 write:14 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi all, I wish to declare a type like type a = A of (b -> unit) | ... where b is a class like class b = object (this) method f : a -> unit = function A f -> f this | _ -> unit end or, alternatively: class b = object inherit [a] otherclass ... end How can I do such a thing, considering that I can't write an "and" keyword between a type declaration and a class (or class type) declaration? Thanks for help Vincenzo ------------------- 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