From: Anton Moscal <msk@post.tepkom.ru>
To: Chris Hecker <checker@d6.com>
Cc: Caml list <caml-list@pauillac.inria.fr>
Subject: Re: circular types?
Date: Mon, 23 Oct 2000 22:43:28 +0400 (MSD) [thread overview]
Message-ID: <Pine.LNX.4.10.10010232240230.8380-100000@post.tepkom.ru> (raw)
In-Reply-To: <4.3.2.7.2.20001020142837.02ee31f0@shell16.ba.best.com>
On Fri, 20 Oct 2000, Chris Hecker wrote:
>
> >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++:
There is no good solution. But may be the following can help you:
type 'bar foo = B of 'bar
...
type bar = F of bar foo
Regards, Anton
next prev parent reply other threads:[~2000-10-24 5:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-20 2:35 Chris Hecker
2000-10-20 12:24 ` Pierre Weis
2000-10-20 21:34 ` Chris Hecker
2000-10-21 8:02 ` Pierre Weis
2000-10-21 18:37 ` Chris Hecker
2000-10-21 12:22 ` Vitaly Lugovsky
2000-10-21 18:29 ` Chris Hecker
2000-10-21 22:36 ` Brian Rogoff
2000-10-23 18:43 ` Anton Moscal [this message]
2000-10-23 7:43 Tom Hirschowitz
2000-10-23 15:35 ` Brian Rogoff
2000-10-25 14:03 ` John Max Skaller
2000-10-25 19:47 ` Brian Rogoff
2000-10-26 9:12 ` Hendrik Tews
2000-10-26 16:37 ` John Max Skaller
2000-10-24 8:37 ` Hendrik Tews
2000-10-25 14:31 ` John Max Skaller
2000-10-26 8:51 ` Hendrik Tews
2000-10-24 8:48 Tom Hirschowitz
2000-10-26 8:39 ` Hendrik Tews
2000-10-26 9:11 ` Tom Hirschowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.10.10010232240230.8380-100000@post.tepkom.ru \
--to=msk@post.tepkom.ru \
--cc=caml-list@pauillac.inria.fr \
--cc=checker@d6.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).