From: Benoit deBoursetty <b-db@graphics.lcs.mit.edu>
To: Olivier Chararas <charar_o@cnam.fr>
Cc: caml-list@inria.fr
Subject: Re: OCAML parametric class coercion
Date: Tue, 1 Jun 1999 00:44:22 -0400 (EDT) [thread overview]
Message-ID: <Pine.SGI.3.93.990601004247.6336D-100000@pigment.lcs.mit.edu> (raw)
In-Reply-To: <37519E82.7D14@cnam.fr>
On Sun, 30 May 1999, Olivier Chararas wrote:
> # class ['a] truc(init,(dev:'a)) =
> object(self)
> method essai = 1
> end
> ;;
> class ['a] truc : 'b * 'a -> object method essai : int end
> #
> class ['a] bidu1((dev:'a)) =
> object(self)
> method rate(untruc) = untruc#essai
> end
> ;;
> Some type variables are unbound in this type:
> class ['a] bidu1 : 'a -> object method rate : < essai : 'b; .. > -> 'b
> end
> The method rate has type < essai : 'a; .. > -> 'a where .. is unbound
> #
> class ['a] bidu2((dev:'a)) =
> object(self)
> method rate(untruc:truc) = untruc#essai
> end
> ;;
> The type constructor truc expects 1 argument(s),
> but is here applied to 0 argument(s)
Ben ca, ca marche, je ne sais pas si c'est ce que tu cherches...
This works, I don't know if it's what you were looking for...
class ['a] bidu1((dev:'a)) =
object(self)
method rate(untruc : 'a truc) = untruc#essai
end;;
Benoit de Boursetty
Benoit.de-Boursetty@polytechnique.fr
prev parent reply other threads:[~1999-06-01 15:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-30 20:24 Olivier Chararas
1999-05-31 10:57 ` Sylvain BOULM'E
1999-06-01 4:44 ` Benoit deBoursetty [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=Pine.SGI.3.93.990601004247.6336D-100000@pigment.lcs.mit.edu \
--to=b-db@graphics.lcs.mit.edu \
--cc=caml-list@inria.fr \
--cc=charar_o@cnam.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