From: Dennis Walter <dennis.walter@gmail.com>
To: caml-list@yquem.inria.fr
Subject: Nested modules with equal types
Date: Thu, 29 Apr 2010 19:20:48 +0200 [thread overview]
Message-ID: <u2h7a5c95d31004291020m4d0b0d50p8663be62f04feb5c@mail.gmail.com> (raw)
Hi,
is there a way in OCaml to define nested modules where a type t of the
inner module is defined as equal to the out type of the same name?
For example, I would like to define a file outer.ml containing
type t
module Inner :
sig
type t = t
end
but I get the error
Error: The type abbreviation t is cyclic
which kind of makes sense. Can I somehow refer to Outer.t in the Inner
module? (Outer.t does in fact not work either).
Thanks!
next reply other threads:[~2010-04-29 17:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-29 17:20 Dennis Walter [this message]
2010-04-29 17:45 ` [Caml-list] " Goswin von Brederlow
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=u2h7a5c95d31004291020m4d0b0d50p8663be62f04feb5c@mail.gmail.com \
--to=dennis.walter@gmail.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;
as well as URLs for NNTP newsgroup(s).