From: Markus Mottl <email@example.com>
Subject: Re: Undefined labels
To: firstname.lastname@example.org (David Brown)
Date: Fri, 19 Nov 1999 17:18:53 +0100 (MET)
In-Reply-To: <email@example.com> from "David Brown" at Nov 18, 99 12:08:32 pm
> I'm not familiar with the parser too much, but perhaps something like:
> open (bleep, bloop, SubMod) Module;;
I think there is not really a big difference to:
let bleep = Module.bleep
let bloop = Module.bloop
module SubMod = Module.SubMod
The typing effort is nearly neglectible, especially if you use a convenient
editor. It also may make things clearer. In fact, your proposal would be
ambiguous, because it is not clear whether "bleep" is a function or a type
(different name spaces!).
> There probably should also be a way to open all of the constructors of
> a type.
Now this would not be so bad an idea, because often such types may have
quite many constructors and in general you need all of them at once.
module M = struct type t = A | B end
type u = M.t
will not do this for you.
What problems could arise if the semantics of "type" were changed to allow
"importing" constructors like this? - It looks pretty harmless at first
sight and would fit to the style of abbreviations used above...
-- Markus Mottl, firstname.lastname@example.org, http://miss.wu-wien.ac.at/~mottl
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:28 MET