Version française
Home     About     Download     Resources     Contact us    
Browse thread
RE: Undefined labels
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Anton Moscal <msk@p...>
Subject: RE: Undefined labels

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