From: Keiko Nakata <keiko@kurims.kyoto-u.ac.jp>
To: sds@gnu.org
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] functor troubles
Date: Tue, 04 Mar 2008 02:15:17 +0900 (JST) [thread overview]
Message-ID: <20080304.021517.46628762.keiko@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <47CC1BE6.2060408@gnu.org>
Hello,
the following thread may be useful to you
http://caml.inria.fr/pub/ml-archives/caml-list/2007/03/80072743d454a8cdc79cb67c110586b0.en.html
With best regards,
Keiko
> It appears that module functor arguments are needlessly duplicated:
>
> ============================================
> module A1 = struct
> ~ module F (M: sig end) = struct
> ~ type t = T
> ~ end
> ~ module I = struct end
> ~ module M = F (I)
> end
>
> module A2 = A1
>
> let f : A1.M.t -> A2.M.t = fun x -> x
> ============================================
>
> This expression has type A1.M.t = A1.F(A1.I).t but is here used with
> type A2.M.t = A1.F(A2.I).t
>
> when I replace "module M = F (I)" with "module M = F (struct end)" it works.
>
> Note that the whole file invokes the functor F precisely once, so it is
> not clear why type A2.M.t is defined in terms of F and not as identical
> to A1.M.t.
prev parent reply other threads:[~2008-03-03 17:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-03 15:40 Sam Steingold
2008-03-03 17:15 ` Keiko Nakata [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=20080304.021517.46628762.keiko@kurims.kyoto-u.ac.jp \
--to=keiko@kurims.kyoto-u.ac.jp \
--cc=caml-list@inria.fr \
--cc=sds@gnu.org \
/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).