From: Jeff Shaw <shawjef3@msu.edu>
To: caml-list@inria.fr
Subject: Re: mutually dependent class and type
Date: Thu, 25 Sep 2008 20:03:12 -0400 [thread overview]
Message-ID: <48DC26C0.8000505@msu.edu> (raw)
I don't know how you might directly get what you want, but here's one
way to get an equivalent result.
class element_aux (c : [`Data of string | `Element of element list]) =
object end
type content = Data of string | Element of element list;;
let content_of_variant = function Data d -> `Data d | Element e ->
`Element e
class element (c : content) = element_aux (content_of_variant c)
next reply other threads:[~2008-09-26 0:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-26 0:03 Jeff Shaw [this message]
2008-09-26 0:08 ` Jeff Shaw
-- strict thread matches above, loose matches on Subject: below --
2008-09-25 22:24 Sébastien Hinderer
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=48DC26C0.8000505@msu.edu \
--to=shawjef3@msu.edu \
--cc=caml-list@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