From: rossberg@mpi-sws.org
To: "Jacques Garrigue" <garrigue@math.nagoya-u.ac.jp>
Cc: rossberg@mpi-sws.org,
"Vincent Aravantinos" <vincent.aravantinos@gmail.com>,
caml-list@inria.fr, "Cedric Cellier" <rixed@happyleptic.org>
Subject: Re: [Caml-list] Include question
Date: Thu, 10 Nov 2011 13:08:31 +0100 (CET) [thread overview]
Message-ID: <bb6428d6c4a9ef6b3d5a4dda5bbc19ea.squirrel@mail.mpi-sws.org> (raw)
In-Reply-To: <36C77095-6853-45FA-9A62-CD7CBC9AC7D4@math.nagoya-u.ac.jp>
> On 2011/11/10, at 1:29, rossberg@mpi-sws.org wrote:
>> Vincent Aravantinos wrote:
>>> This verbosity problem is actually less true since 3.12 with the
>>> introduction of "module type of":
>>>
>>> module A = struct
>>> ...
>>> end
>>>
>>> module Make_B (X: module type of A) = struct
>>> ...
>>> end
>>>
>>> Which is then quite close to the "include" version.
>>
>> Except that it defeats the whole point of functorizing, because you won't
>> be
>> able to plug in another module than A anymore (unless A defines no
>> abstract
>> types, in which case you can get away with it).
>
> This is actually the opposite: "module type of A" gives no equation for the
> abstract types, so if module A contained an abstract type, you will be able
> to change it by another abstract one. On the other hand, all concrete types
> will stay there, and you will have no way to change them even if Make_B
> doesn't care.
Oh, interesting. I was under the impression that A's signature gets
selfified as usual, so that
sig module X : module type of A end
is equivalent to
sig module X : SA end with module X = A
(Have no Ocaml 3.12 around here, unfortunately.)
Thanks for the correction!
/Andreas
prev parent reply other threads:[~2011-11-10 12:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 15:03 Hans Ole Rafaelsen
2011-11-08 15:10 ` Gabriel Scherer
2011-11-08 15:45 ` Hans Ole Rafaelsen
2011-11-08 15:50 ` Thomas Gazagnaire
2011-11-08 15:49 ` Alexandre Pilkiewicz
2011-11-09 7:29 ` Cedric Cellier
2011-11-09 15:41 ` Vincent Aravantinos
2011-11-09 15:50 ` Vincent Aravantinos
2011-11-09 16:29 ` rossberg
2011-11-09 17:08 ` Vincent Aravantinos
2011-11-09 23:36 ` Jacques Garrigue
2011-11-10 12:08 ` rossberg [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=bb6428d6c4a9ef6b3d5a4dda5bbc19ea.squirrel@mail.mpi-sws.org \
--to=rossberg@mpi-sws.org \
--cc=caml-list@inria.fr \
--cc=garrigue@math.nagoya-u.ac.jp \
--cc=rixed@happyleptic.org \
--cc=vincent.aravantinos@gmail.com \
/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