From: Radzevich Belevich <radzevich.belevich@gmail.com>
To: Caml List <caml-list@inria.fr>
Subject: class type param constraint
Date: Thu, 09 Apr 2009 12:42:06 +0400 [thread overview]
Message-ID: <1239266526.2787.5.camel@serphost.localdomain> (raw)
class [ 'c ] a =
object(self)
constraint 'c = < .. >
method as_c = (self :> 'c)
method id = Oo.id self
end ;;
class ['a] a :
object ('a)
constraint 'a = < as_c : 'a; id : int; .. >
method as_c : 'a
method id : int
end
================
Why type 'c must have methods "as_c" and "id" ?
next reply other threads:[~2009-04-09 8:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-09 8:42 Radzevich Belevich [this message]
2009-04-09 10:10 ` [Caml-list] " Radzevich Belevich
2009-04-09 10:13 ` Jacques Garrigue
2009-04-09 10:21 ` Radzevich Belevich
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=1239266526.2787.5.camel@serphost.localdomain \
--to=radzevich.belevich@gmail.com \
--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