Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
local Open
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Sniffen <brian.sniffen@g...>
Subject: Re: [Caml-list] local Open
On Tue, 25 Jan 2005 14:27:40 +0100, Oliver Bandel
<> wrote:
> is it planned to have a local Open-statement in OCaml
> in newer Versions?

There is no local open because open is entirely syntactic.  What you
can do to simulate a local open is this: wrap your code in a module
which is a functor.  Provide as arguments the modules you wish to
"locally open".  Then you can write in those terms inside your

Also, be aware that "open" is only scoped to that file in which it
occurs, and you can acheive similar effects with less writing by
splitting your code into separate files.

Brian T. Sniffen    or