From: Paolo Herms <paolo.herms@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Re: Define class and sum type in one time
Date: Thu, 17 Mar 2011 12:02:58 +0100 [thread overview]
Message-ID: <201103171202.59214.paolo.herms@inria.fr> (raw)
In-Reply-To: <350217430.1223639.1300359057593.JavaMail.root@zmbs3.inria.fr>
Yes, but you can still do this:
type 'maclasse truc = Machin of ('maclasse->int) | Recur of 'maclasse truc
class maclasse = object(self)
val mutable valeur = (None : maclasse truc option)
method getValeur = valeur
end
--
Paolo Herms
PhD Student - CEA-LIST Software Safety Lab. / INRIA ProVal Project
Paris, France
On Thursday 17 March 2011 11:50:57 Pierre-Alexandre Voye wrote:
> So, this is impossible ? :
>
> class maclasse = object(self)
> val mutable valeur = (None : truc option)
> method getValeur = valeur
> end
> and
> truc = Machin of (maclasse->int) | Recur of truc;;
prev parent reply other threads:[~2011-03-17 11:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-17 10:08 [Caml-list] " Pierre-Alexandre Voye
2011-03-17 10:33 ` [Caml-list] " Pierre-Alexandre Voye
2011-03-17 10:47 ` Guillaume Yziquel
2011-03-17 10:50 ` Pierre-Alexandre Voye
2011-03-17 11:01 ` David Rajchenbach-Teller
2011-03-17 11:14 ` David Rajchenbach-Teller
2011-03-17 11:05 ` Guillaume Yziquel
2011-03-17 13:44 ` Gabriel Scherer
[not found] ` <1080649473.122478.1300369493351.JavaMail.root@zmbs4.inria.fr>
2011-03-17 13:54 ` Fabrice Le Fessant
2011-03-18 17:16 ` Gerd Stolpmann
[not found] ` <350217430.1223639.1300359057593.JavaMail.root@zmbs3.inria.fr>
2011-03-17 11:02 ` Paolo Herms [this message]
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=201103171202.59214.paolo.herms@inria.fr \
--to=paolo.herms@inria.fr \
--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;
as well as URLs for NNTP newsgroup(s).