From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Francois Pottier <Francois.Pottier@inria.fr>,
"Pierre CREGUT - FT . BD/CNET/DTL/MSV"
<pierre.cregut@cnet.francetelecom.fr>,
caml-list@inria.fr
Cc: caml-list@inria.fr
Subject: Re: Parameterized signatures needed ?
Date: Thu, 16 Sep 1999 18:59:39 +0200 [thread overview]
Message-ID: <19990916185939.24663@pauillac.inria.fr> (raw)
In-Reply-To: <19990914114600.57679@pauillac.inria.fr>; from Francois Pottier on Tue, Sep 14, 1999 at 11:46:00AM +0200
> In view of the
> solutions which exist at the level of expressions, one may suggest
> extending O'Caml with
>
> * either explicit sub-signature constraints, e.g.
>
> module d(X:sig
> module type B < sig type t end
> module F(a:A) : sig
> module b:B
> module c:C with type t = b.t
> end
> end) : ...
It looks like this would fit quite naturally within the OCaml module
system. After all, the module language is explicitely typed, has
subtyping and a form of parametric polymorphism; bounded polymorphism
is the next step. (I haven't checked the details, though.)
> * or row variables in signatures, although I am not sure which form
> this would take.
This looks less natural to me. A very limited form of "row
polymorphism" can already be expressed with module type parameters and
sub-structures, as in:
module d(X:sig
module type X
module F(a:A) : sig
module b: sig type t module M: X end
module c:C with type t = b.t
end
end) : ...
but it's very limited and not really practical.
- Xavier Leroy
next prev parent reply other threads:[~1999-09-17 12:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-13 10:25 Pierre CREGUT - FT . BD/CNET/DTL/MSV
1999-09-14 9:46 ` Francois Pottier
1999-09-16 16:59 ` Xavier Leroy [this message]
1999-09-17 13:01 ` Pierre CREGUT - FT . BD/CNET/DTL/MSV
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=19990916185939.24663@pauillac.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=Francois.Pottier@inria.fr \
--cc=caml-list@inria.fr \
--cc=pierre.cregut@cnet.francetelecom.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