caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Vincent Aravantinos <vincent.aravantinos@gmail.com>
To: Dawid Toton <d0@wp.pl>
Cc: caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Re: Module type of a structure returned by functor
Date: Mon, 26 Apr 2010 18:48:05 +0200	[thread overview]
Message-ID: <84448358-089B-4505-A814-FC4C2EC5BB08@gmail.com> (raw)
In-Reply-To: <4BD5C057.7020800@wp.pl>

Hi,

Le 26 avr. 10 à 18:33, Dawid Toton a écrit :

> I've found that I have more fundamental problem. What is the exact  
> meaning of the following line?
>
> module type Foo = functor (X:X) -> sig val foo : X.t end
>
> (1) Foo is not a functor, but it is a type of some functors that map  
> modules to modules
> (2) Foo is a mapping from modules to module types
>
> Currently I think that it (1) is true and (2) is false. Let me know  
> if I'm wrong.

You're right.

> It means that there is no easy way to get module type of what  
> results from functor application. I think that the solution is to  
> separately define signature of results of the functor and use "with  
> type" clauses to recreate all result module types that are needed.

That's exactly the way to go (BTW is it such a pain? maybe your "with  
type" is easily inferred but not easily written?)

> This is not very bad, but I'm still wondering if "module type of..."  
> of 3.12 will provide elegant solution for this.

I can't remember this point...

V.

  reply	other threads:[~2010-04-26 16:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-23 23:14 Dawid Toton
2010-04-26 16:33 ` Dawid Toton
2010-04-26 16:48   ` Vincent Aravantinos [this message]
2010-04-26 16:54   ` [Caml-list] " rossberg
2010-04-27  0:23 ` [Caml-list] " Jacques Garrigue

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=84448358-089B-4505-A814-FC4C2EC5BB08@gmail.com \
    --to=vincent.aravantinos@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=d0@wp.pl \
    /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).