From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA29875; Tue, 11 Sep 2001 14:15:33 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA29997 for ; Tue, 11 Sep 2001 14:15:32 +0200 (MET DST) Received: from dpt-info.u-strasbg.fr (dpt-info.u-strasbg.fr [130.79.44.193]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f8BCFVL28196 for ; Tue, 11 Sep 2001 14:15:31 +0200 (MET DST) Received: (from luther@localhost) by dpt-info.u-strasbg.fr (8.9.3/8.9.3) id OAA30340; Tue, 11 Sep 2001 14:16:03 +0200 Date: Tue, 11 Sep 2001 14:16:02 +0200 From: Sven To: Andreas Rossberg Cc: caml-list@inria.fr Subject: Re: [Caml-list] Style question Message-ID: <20010911141602.A30234@dpt-info.u-strasbg.fr> References: <20010909132144.X7348-100000@shell5.ba.best.com> <3B9DE076.568458F9@ps.uni-sb.de> <20010911125524.B29665@dpt-info.u-strasbg.fr> <3B9DFEC0.2D7BCAEA@ps.uni-sb.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <3B9DFEC0.2D7BCAEA@ps.uni-sb.de>; from rossberg@ps.uni-sb.de on Tue, Sep 11, 2001 at 02:08:32PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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