From: Jacques GARRIGUE <garrigue@kurims.kyoto-u.ac.jp>
To: tews@tcs.inf.tu-dresden.de
Cc: caml-list@inria.fr
Subject: Re: grammar for class types, reraised
Date: Wed, 23 Jun 1999 10:40:49 +0900 [thread overview]
Message-ID: <19990623104049R.garrigue@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: Your message of "Tue, 22 Jun 1999 19:00:22 +0200" <199906221700.TAA21025@ithif20.inf.tu-dresden.de>
From: Hendrik Tews <tews@tcs.inf.tu-dresden.de>
> From: Jerome Vouillon <Jerome.Vouillon@inria.fr>
> > 2. Why is it not possible to add type constraints to the first
> > kind of type abbreviation, like in
> >
> > class type ['a] c = ['a, string] a constraint 'a = int;;
>
> There is no real reason. I think I could add this quite easily to the
> language if you need this.
In fact, you can already do that:
class type ['a, 'b] a = object method m : 'a -> 'b end
class type ['a] c = object
inherit ['a,string] a
constraint 'a = int
end
Remark also that inheritance at the type level does not presuppose
inheritance at the value level, so this should be general enough.
Jacques
---------------------------------------------------------------------------
Jacques Garrigue Kyoto University garrigue at kurims.kyoto-u.ac.jp
<A HREF=http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/>JG</A>
prev parent reply other threads:[~1999-06-23 19:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-14 8:04 Hendrik Tews
1999-06-14 21:30 ` Jerome Vouillon
1999-06-15 17:04 ` John Prevost
1999-06-22 17:00 ` Hendrik Tews
1999-06-23 1:40 ` Jacques GARRIGUE [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=19990623104049R.garrigue@kurims.kyoto-u.ac.jp \
--to=garrigue@kurims.kyoto-u.ac.jp \
--cc=caml-list@inria.fr \
--cc=tews@tcs.inf.tu-dresden.de \
/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