Excerpts from Jon Harrop's message of Tue Nov 18 19:17:23 +0100 2008: > On Tuesday 18 November 2008 10:06:25 Richard Jones wrote: > > On Tue, Nov 18, 2008 at 10:56:18AM +0100, David Teller wrote: > > > open System.IO;; > > > open System.File;; > > > > Your biggest problem is using dot ('.') instead of underscore ('_'). > > Using a dot means that the System namespace cannot be extended by > > external packages. If you use an underscore then an external package > > can extend the namespace (eg. by providing System_Newpackage) > > I don't follow. Can you not use "include" to extend an existing module: > > # module Array = struct > include Array > let empty = [||] > end;; > module Array : > sig > external length : 'a array -> int = "%array_length" > ... > val empty : 'a array > end
Yes but that's the same than saying you can change a value: let x = 42 let x = x + 1 So you make a new module but don't extend it. -- Nicolas Pouillard aka Ertai _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs