From: Nicolas C. <war...@fr...> - 2003-03-25 01:40:16
|
> > This still does let one use all of ExtLib with a simple > > open ExtLib > > > > I think that > > > > module ExtLib = struct > > module List = ExtList > > ... > > end > > > > will solve this problem. > > Perhaps, but I wonder then if you're doing > open ExtLib > are you linking with all the modules ExtList, ExtHashtbl, ExtString... even > if you're not using them ? I have checked the following. When you're doing "open ExtLib" it will really link all the modules declared in extLib.ml, even if later the application does not use them. We have then three choices : - use my module structure proposal, that will cause the users which are using ExtLib as an extension to link all the overidden modules - use Manos Renieris one, that will cause the users which are using ExtLib as an StdLib replacement to link all the overidden modules - find another prefix keyword ( for exemple Std ) so there is no more ExtLib module, but it can be use : As a replacement of the List standard module : --- test.ml --- open StdList List.map f l --- stdList.mli --- module List : sig <...> end As a extended library of functions : --- test.ml --- ExtList.map f l -- extList.ml ---- include StdList.List Nicolas Cannasse |