From: Keiko Nakata <keiko@kurims.kyoto-u.ac.jp>
To: jeremie.lumbroso@etu.upmc.fr
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Separating two mutually recursive modules
Date: Thu, 21 Aug 2008 18:29:01 +0900 (JST) [thread overview]
Message-ID: <20080821.182901.68534700.keiko@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <2b7b425b0808201654i61d3f878gbed5c27ca9114438@mail.gmail.com>
Hello,
> I have been unable to cleanly specify the code below (or something
> equivalent) without resorting to Obj.magic. (In the example below,
> "Boxes.B.t" as referenced by the Validator module would ideally simply
> be "Boxes.t", and Validator would not "see" the submodules;)
Can I look at the code which does not type check without Obj.magic?
Ideally something like if I comment out Obj.magic then I get a type error,
and if I comment it in then the code type checks,
so that I can identify the point of the issue?
(In the context of this simplified example of Boxes & Validator)
> (********************)
> (* MODULE Validator *)
> (********************)
>
> and Validator : sig
>
> (* This type has been simplified for explanatory purposes. *)
> (* IDEALLY, Boxes.B.t would simply be B.t. *)
> type t = Me of int | Node of t * t | B of Boxes.B.t
>
> val fold_on_B : (Boxes.B.t -> 'a) -> ('a -> 'a -> 'a) -> 'a -> t -> 'a
>
> end =
But B is not in the scope, isn't it?
With best,
Keiko
next prev parent reply other threads:[~2008-08-21 9:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-20 23:54 Separating two mutually recursive modules (was Specifying recursive modules?) Jérémie Lumbroso
2008-08-21 9:29 ` Keiko Nakata [this message]
2008-08-21 11:00 ` [Caml-list] Separating two mutually recursive modules Jérémie Lumbroso
2008-08-22 8:56 ` Keiko Nakata
2008-08-23 16:40 ` Jérémie Lumbroso
2008-08-27 13:09 ` Keiko Nakata
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=20080821.182901.68534700.keiko@kurims.kyoto-u.ac.jp \
--to=keiko@kurims.kyoto-u.ac.jp \
--cc=caml-list@inria.fr \
--cc=jeremie.lumbroso@etu.upmc.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