From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA16078 for caml-red; Sat, 21 Oct 2000 09:52:17 +0200 (MET DST) 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 XAA09142 for ; Fri, 20 Oct 2000 23:56:48 +0200 (MET DST) Received: from mta5.snfc21.pbi.net (mta5.snfc21.pbi.net [206.13.28.241]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id e9KLul527674; Fri, 20 Oct 2000 23:56:47 +0200 (MET DST) Received: from checkerlap.d6.com ([64.163.212.178]) by mta5.snfc21.pbi.net (Sun Internet Mail Server sims.3.5.2000.01.05.12.18.p9) with ESMTP id <0G2R0092K0NRSE@mta5.snfc21.pbi.net>; Fri, 20 Oct 2000 14:50:29 -0700 (PDT) Date: Fri, 20 Oct 2000 14:34:06 -0700 From: Chris Hecker Subject: Re: circular types? In-reply-to: <200010201224.OAA29639@pauillac.inria.fr> X-Sender: def6@shell16.ba.best.com To: Pierre Weis Cc: caml-list@inria.fr Message-id: <4.3.2.7.2.20001020142837.02ee31f0@shell16.ba.best.com> MIME-version: 1.0 X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Content-type: text/plain; charset="us-ascii" References: <4.3.2.7.2.20001019193338.02db0220@walt> Sender: weis@pauillac.inria.fr >It's exactly similar to value definitions: put a ``and'' between the >two recursive definitions. >type foo = B of bar >and bar = F of foo Ah, thanks! Is there any way to do it without the "and"? In other words, what if I want to do this but the types are defined "far away" from each other in the source. The "and" solution works, but I'm looking for something like forward declarations from C++: class foo; class bar; class foo { bar *Bar; }; // ...lots of stuff... class bar { foo *Foo; }; Chris