On 27-11-2006, Johann Spies < jspies%40sun.ac.za">jspies
sun.ac.za> wrote:
> On Mon, Nov 27, 2006 at 12:17:13PM +0000, Richard Jones wrote:
>> On Mon, Nov 27, 2006 at 11:49:33AM +0200, Johann Spies wrote:
>> > In fileUtil.mli I get:
>> > module type FILE_UTILS =
>>
>> It's confusing isn't it ... Here FileUtil.FILE_UTILS is a module
>> type, not an actual module. A module type is just a signature
>> (similar to an "interface" in Java) which defines the type of the
>> functions and values in the module, but doesn't actually contain any
>> code to implement those functions.
>>
>> I had to go and look at Sylvain's code to see that this module type is
>> actually implemented by various concrete modules, including
>> FileUtil.StrUtil
>> (http://sylvain.le-gall.net/ocaml-fileutils/FileUtil.StrUtil.html), so
>> you would, it seems, need to use FileUtil.StrUtil.ls, or one of the
>> other concrete modules.
>
> Thanks.
>
Indeed. The reason for this : there is many different implementation of
regex (str, pcre...) I don't want to retain one, so i enable people to
use any. But it generates a more complicated code...
I should write a documentation 
I recommend you to define, in a file common.ml, for example :
module MyFileutil = FileUtil.StrUtil;;
and then in function.ml :
open Common.MyFileutil;;
(so you will have a central place for Fileutil definition).
Regards,
Sylvain Le Gall
.