caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dawid Toton <d0@wp.pl>
To: caml-list <caml-list@yquem.inria.fr>
Subject: Re: Module type of a structure returned by functor
Date: Mon, 26 Apr 2010 18:33:27 +0200	[thread overview]
Message-ID: <4BD5C057.7020800@wp.pl> (raw)
In-Reply-To: <4BD229E4.4050003@wp.pl>

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.

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.

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

Dawid


  reply	other threads:[~2010-04-26 16:33 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 [this message]
2010-04-26 16:48   ` [Caml-list] " Vincent Aravantinos
2010-04-26 16:54   ` 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=4BD5C057.7020800@wp.pl \
    --to=d0@wp.pl \
    --cc=caml-list@yquem.inria.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;
as well as URLs for NNTP newsgroup(s).