Browse thread
[Caml-list] Style question
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2001-09-11 (12:15) |
From: | Sven <luther@d...> |
Subject: | Re: [Caml-list] Style question |
On Tue, Sep 11, 2001 at 02:08:32PM +0200, Andreas Rossberg wrote: > Sven wrote: > > > > > local open M in > > > ... > > > end > > > > > > Of course, in OCaml this is solved by having open vs. include. > > > > Also, would not : > > > > let module = struct ... end in > > > > be another solution for it, maybe in conjunction with the open syntax ? > > Not sure, since I don't understand your code snippet, or how it is > related to local or open. Could you clarify a bit? Well, consider : let module M = struct let f x = x * x end in M.f 5 ;; Sure, you still have to access f trough M., but you could imagine something with the open/include directive. Not sure if it is possible already to do a local open, but i think it was already discussed in the past. Consider : let module M = struct let f x = x * x end in let open M in f 5 ;; not sure if that is what you wanted though, ... Friendly, Sven Luther ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr