From: "Sébastien Hinderer" <Sebastien.Hinderer@ens-lyon.org>
To: caml-list@yquem.inria.fr
Subject: mutually dependent class and type
Date: Fri, 26 Sep 2008 00:24:39 +0200 [thread overview]
Message-ID: <20080925222439.GA7968@galois> (raw)
Dear list,
Is there a (clean) way to define simultaneously a class and a type that
are mutually recursive ?
Something like this :
class element (c : content) =
object
...
end and type content =
| Data of string
| Elements of element list;;
This is of course not a valid OCaml definition, but is there a way to
express it ?
Many thanks in advance for your help,
Sébastien.
next reply other threads:[~2008-09-25 22:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-25 22:24 Sébastien Hinderer [this message]
2008-09-25 23:41 ` [Caml-list] " Martin Jambon
2008-09-26 6:40 ` Tim Rentsch
2008-10-05 13:31 ` Yann Régis-Gianas
2008-09-26 0:03 Jeff Shaw
2008-09-26 0:08 ` Jeff Shaw
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=20080925222439.GA7968@galois \
--to=sebastien.hinderer@ens-lyon.org \
--cc=caml-list@yquem.inria.fr \
/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