Version française
Home     About     Download     Resources     Contact us    
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: Julien Signoles <Julien.Signoles@l...>
Subject: Re: [Caml-list] local Open
Hello,

> There are local modules... but not local Open's?!
>
> Any idea about that?

openin is probably your friend. It is a camlp4 syntax extension by Alain
Frisch allowing local open's and struct's. The file is available at:

	http://www.eleves.ens.fr/home/frisch/soft.html#openin

exemple:

module M = struct let x = 0 end
let y = open M in x top

-->

let y =
  let module OPENIN_1 = struct open M let res = x in
  OPENIN_1.res

Hope this helps,
Julien Signoles
-- 
mailto:Julien.Signoles@lri.fr ; http://www.lri.fr/~signoles
"In theory, practice and theory are the same,
but in practice they are different" (Larry McVoy)