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