Browse thread
Invoking the standard library ?
-
David Teller
-
Eric Cooper
-
Jacques Garrigue
- Christophe Raffalli
- David Teller
-
Jacques Garrigue
- David Teller
-
Eric Cooper
[
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: | 2008-04-30 (07:51) |
From: | Christophe Raffalli <christophe.raffalli@u...> |
Subject: | Re: [Caml-list] Invoking the standard library ? |
Jacques Garrigue a écrit : > From: Eric Cooper <ecc@cmu.edu> > Subject: Re: [Caml-list] Invoking the standard library ? > Date: Tue, 29 Apr 2008 14:19:58 -0400 > >> On Tue, Apr 29, 2008 at 04:26:45PM +0200, David Teller wrote: >>> modules String, Stream, etc. For this, I need to include the original >>> module, as provided in the standard library, and add stuff. Now, the >>> trick is that I'd like to keep the same name as the original module. >> My first thought was that the usual shadowing of bindings could >> be used, and indeed the following works fine in the toplevel: >> A very simple solution (that I use for PML) would be to change ocaml so that a directory in the path is considered as a module whose fields are the modules and directory inside it ... This allows two files to have the same name and depending if you open or not the module/directory containing an extended string library, you can access by open String the original or the extended module. You can even decide that it is possible to assign a .mli file to a directory to hide some modules inside it ... Christophe -- Christophe Raffalli Universite de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tel: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature. The public key is stored on www.keyserver.net ---------------------------------------------