From: Lukasz Stafiniak <lukstafi@gmail.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Unimplemented modules as top-level signatures
Date: Thu, 23 Dec 2010 16:33:47 +0100 [thread overview]
Message-ID: <AANLkTimLbfFf-w4KApOKqVRM98zUCrmSACZ8wDmwapPV@mail.gmail.com> (raw)
In-Reply-To: <20101217091950.GA28557@melkinpaasi.cs.helsinki.fi>
Interesting question. Lack of response on the mailing list means
agreement that this is an OK style?
On Fri, Dec 17, 2010 at 10:19 AM, Lauri Alanko <la@iki.fi> wrote:
> A minor annoyance in OCaml is that although you can (and must) put
> each top-level module into its own file, there is no corresponding
> mechanism for defining module types on their own: you always have to
> put a "module type" definition inside another module, which
> complicates scoping, and with standard tools adds an extra level of
> indentation to the signature definition.
>
> However, with 3.12 there is solution of sorts: write the signature
> definition in foo.mli without an accompanying foo.ml, and then refer
> to the signature as "module type of Foo".
>
> Is this horrible style? Are there some pitfalls I should be aware of?
> Or are there better solutions to my desire to avoid nested scoping?
> Top-level functors would also be nice to have... :)
next prev parent reply other threads:[~2010-12-23 15:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-17 9:19 Lauri Alanko
2010-12-23 15:33 ` Lukasz Stafiniak [this message]
2010-12-23 15:47 ` [Caml-list] " Sylvain Le Gall
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=AANLkTimLbfFf-w4KApOKqVRM98zUCrmSACZ8wDmwapPV@mail.gmail.com \
--to=lukstafi@gmail.com \
--cc=caml-list@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