From: "Stephen Weeks" <sweeks@sweeks.com>
To: caml-list@yquem.inria.fr
Subject: question about "with module"
Date: Thu, 22 Mar 2007 12:12:14 -0400 [thread overview]
Message-ID: <604682010703220912m1f6ecfay84b3ffacd53f50db@mail.gmail.com> (raw)
Why does this program typecheck?
------------------------------------------------------------
module type S = sig
module A : sig
val x : int
end
module Z : sig
module B : sig
end
end with module B = A
end
module F (S : S) = struct let _ = S.Z.B.x end
------------------------------------------------------------
The explanation of "with module" in the manual:
http://caml.inria.fr/pub/docs/manual-ocaml/manual018.html
says:
The constraint module module-path = extended-module-path adds type equations
to all type components of the sub-structure denoted by module-path, making
them equivalent to the corresponding type components of the structure denoted
by extended-module-path.
It doesn't say anything about adding value components.
reply other threads:[~2007-03-22 16:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=604682010703220912m1f6ecfay84b3ffacd53f50db@mail.gmail.com \
--to=sweeks@sweeks.com \
--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