RE: Undefined labels

From: Anton Moscal (msk@post.tepkom.ru)
Date: Fri Nov 19 1999 - 15:35:28 MET


Date: Fri, 19 Nov 1999 17:35:28 +0300 (MSK)
From: Anton Moscal <msk@post.tepkom.ru>
To: Brian Rogoff <bpr@best.com>
Subject: RE: Undefined labels
In-Reply-To: <Pine.BSF.4.10.9911151627270.23897-100000@shell5.ba.best.com>

On Mon, 15 Nov 1999, Brian Rogoff wrote:

> > This is the standard example for why we need a local open in the language.
> >
> > -Manuel
>
> Let me second that motion. Coming from Ada, I always wondered why OCaml
> doesn't allow you to restrict the scope of open, instead of putting it
> always at module level.

This construction can be easy simulated by `let module' construction:

let open M in E
 =>
let module _TEMP = struct
   open M;
   let __RES = E
end
in __RES

I implement this conversion for my own use by camlp4 as syntax extension
(with other local declarations: let type, let exception, etc.)

Anton



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:28 MET