caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Andreas Rossberg <rossberg@mpi-sws.org>
To: Markus Mottl <markus.mottl@gmail.com>
Cc: yminsky@gmail.com, caml-list@inria.fr
Subject: Re: [Caml-list] "with module" surprises
Date: Mon, 9 May 2011 19:33:12 +0200	[thread overview]
Message-ID: <55DBF56A-2EEF-4854-8287-EF406078078E@mpi-sws.org> (raw)
In-Reply-To: <BANLkTi=nApQE-1rYmp_HMCFQ1PLMq9ReWg@mail.gmail.com>

On May 9, 2011, at 19.21 h, Markus Mottl wrote:
> A use case for the intended semantics might be reexporting of  
> functor arguments:
>
>  module Make (Arg : ARG) : S with module Spec = Arg = struct
>    module Spec = Arg
>    ...
>  end
>
> It could be bad from a design perspective to lose substructures in
> "Spec" which were unknown to "S".

If I understand your example correctly, then I don't think it does  
what you think it does. That is, if you apply Make to some M that is  
wider than ARG, you still won't have the additional components in  
F(M).Spec, because M gets narrowed to ARG by the functor application  
anyway.

/Andreas


  reply	other threads:[~2011-05-09 17:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09 14:27 Yaron Minsky
2011-05-09 15:12 ` Markus Mottl
2011-05-09 16:26   ` Yaron Minsky
2011-05-09 17:21     ` Markus Mottl
2011-05-09 17:33       ` Andreas Rossberg [this message]
2011-05-09 18:56         ` Markus Mottl

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=55DBF56A-2EEF-4854-8287-EF406078078E@mpi-sws.org \
    --to=rossberg@mpi-sws.org \
    --cc=caml-list@inria.fr \
    --cc=markus.mottl@gmail.com \
    --cc=yminsky@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;
as well as URLs for NNTP newsgroup(s).