From: Nicolas C. <war...@fr...> - 2003-03-17 08:24:54
|
Hi list, I have been thinking for some time on the module structure for ExtLib issues, and I think I found a quite reasonable comprise. Ok, first of all, we we talk there only about modules which are extending the StdLib ones, other "new" modules doesn't cause any problems. But for the Stdlib one - let's take the example of ExtList - there is some problems : - some people would like to use ExtList as a replacement of List For this first category of people, we can do the following : -- file extList.mli --- module List : sig ... end --- eof --- Like this theses people will only have to add an extra "open ExtList" in the beginning of their files and then they can use the List standard functions as well as the List extended ones within the same short and readable namespace : List. But ! - this we're modifying the specification of some functions, people with existing running code would like to use only ExtList as an additionnal library of functions, without overriding the current Stdlib ones. Here's the answer : --- file extLib.mli --- module ExtList = ExtList.List --- eof --- So they only have to do an "open ExtLib" and then they can use extended functions under the ExtList namespace. Nicolas Cannasse |