From: John Prevost <j.prevost@cs.cmu.edu>
To: Anton Moscal <msk@post.tepkom.ru>
Cc: caml-list@inria.fr
Subject: Re: Local opening of modules
Date: Tue, 10 Nov 1998 16:22:51 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.3.95L.981110161850.2472G-100000@naiad.fac.cs.cmu.edu> (raw)
In-Reply-To: <Pine.LNX.4.03.9811101745250.27072-100000@post.tepkom.ru>
On Tue, 10 Nov 1998, Anton Moscal wrote:
> With CamlP4 preprocessor (tool for syntax extension of Ocaml) I got
> this effect by the following grammar extension:
{...}
Interesting. I hadn't realized that you could define modules inside let
statements like this:
let f x =
let module M = struct
open Foo;;
let v = x + x
end
in M.v
(which is exactly what you're doing...)
Actually, the non-sugared form I've written above is pretty satisfactory
all by itself, although not as clean looking as the sugared-up camlp4
stuff.
Thanks!
John.
next prev parent reply other threads:[~1998-11-12 7:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-10-27 20:35 John Prevost
1998-11-10 16:04 ` Anton Moscal
1998-11-10 21:22 ` John Prevost [this message]
1998-11-25 15:17 ` Objects as sums Anton Moscal
1998-11-26 15:58 ` Didier Remy
1998-11-28 10:46 ` Anton Moscal
1998-11-30 12:35 ` Jerome Vouillon
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=Pine.LNX.3.95L.981110161850.2472G-100000@naiad.fac.cs.cmu.edu \
--to=j.prevost@cs.cmu.edu \
--cc=caml-list@inria.fr \
--cc=msk@post.tepkom.ru \
/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