Re: [Caml-list] Module abbreviation

2009-12-18 Thread Romain Bardou
Basile STARYNKEVITCH wrote: Romain Bardou wrote: Basile STARYNKEVITCH wrote: Romain Bardou wrote: Hello, dear Caml-list, I have a file ast.mli. It has no .ml implementation as it contains only type definitions. Then you should name that file ast.ml. Last time I tested (more than a year

Re: [Caml-list] Module abbreviation

2009-12-17 Thread Romain Bardou
Basile STARYNKEVITCH wrote: Romain Bardou wrote: Hello, dear Caml-list, I have a file ast.mli. It has no .ml implementation as it contains only type definitions. Then you should name that file ast.ml. Last time I tested (more than a year ago) n ast.ml file without corresponding ast.mli

Re: [Caml-list] Module abbreviation

2009-12-17 Thread Basile STARYNKEVITCH
Romain Bardou wrote: Basile STARYNKEVITCH wrote: Romain Bardou wrote: Hello, dear Caml-list, I have a file ast.mli. It has no .ml implementation as it contains only type definitions. Then you should name that file ast.ml. Last time I tested (more than a year ago) n ast.ml file without

[Caml-list] Module abbreviation

2009-12-15 Thread Romain Bardou
Hello, dear Caml-list, I have a file ast.mli. It has no .ml implementation as it contains only type definitions. I have a file toto.ml, which contains simply: module A = Ast So I only use it as an abbreviation, to write A.t instead of Ast.t for instance. However, at link-time, the following

Re: [Caml-list] Module abbreviation

2009-12-15 Thread Ashish Agarwal
If you only have a file ast.mli, you should not be able to write Ast.Sig because you do not have a module named Ast. Please double check your example. It cannot be working as you describe. On Tue, Dec 15, 2009 at 11:39 AM, Romain Bardou rom...@bardou.fr wrote: Hello, dear Caml-list, I have a

Re: [Caml-list] Module abbreviation

2009-12-15 Thread Basile STARYNKEVITCH
Romain Bardou wrote: Hello, dear Caml-list, I have a file ast.mli. It has no .ml implementation as it contains only type definitions. Then you should name that file ast.ml. Last time I tested (more than a year ago) n ast.ml file without corresponding ast.mli file is handled as if ast.mli

RE: [Caml-list] Module abbreviation

2009-12-15 Thread David Allsopp
Ashish Agarwal wrote: If you only have a file ast.mli, you should not be able to write Ast.Sig because you do not have a module named Ast. This isn't true - the include statement works at a type system level (because you're dealing with a signature) and therefore only a .cmi file is required. It

Re: [Caml-list] Module abbreviation

2009-12-15 Thread Ashish Agarwal
the example given compiles Surprising! I see your point about the types working out, but this also requires the additional assumption that the module type defined by ast.mli will be ascribed specifically to a module named Ast. I suppose this is consistent with how ocaml associates file names