From: "Stephen Weeks" <sweeks@sweeks.com>
To: caml-list@yquem.inria.fr
Subject: question on type checking
Date: Tue, 20 Mar 2007 14:20:38 -0400 [thread overview]
Message-ID: <604682010703201120j54305a8dmf7174f434cedfa96@mail.gmail.com> (raw)
Why does one of the programs below fail to type check while the other two minor
variants succeed? I would expect all three to succeed.
----------------------------------------------------------------------
(* FAILS *)
module F (Z : sig end) = struct
type t = A
end
module S = struct
module Z = struct end
module M = F (Z)
include M
end
let f x =
let module S = S in
match x with
| S.A -> ()
----------------------------------------------------------------------
(* WORKS *)
module F (Z : sig end) = struct
type t = A
end
module S = struct
module M = F (struct end)
include M
end
let f x =
let module S = S in
match x with
| S.A -> ()
----------------------------------------------------------------------
(* WORKS *)
module F (Z : sig end) = struct
type t = A
end
module S = struct
module Z = struct end
module M = F (Z)
include M
end
let f x =
match x with
| S.A -> ()
----------------------------------------------------------------------
next reply other threads:[~2007-03-20 18:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-20 18:20 Stephen Weeks [this message]
2007-03-21 15:51 ` [Caml-list] " Derek Dreyer
2007-03-22 1:13 ` Stephen Weeks
2007-03-22 4:32 ` Derek Dreyer
2007-03-26 14:24 ` Xavier Leroy
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=604682010703201120j54305a8dmf7174f434cedfa96@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