[Omake] More on ocamldep and generated files.
Francois Pottier
Francois.Pottier at inria.fr
Thu Jun 15 00:34:56 PDT 2006
On Wed, Jun 14, 2006 at 11:42:31AM -0700, Jason Hickey wrote:
> Francois Pottier wrote:
> >Have you thought about the situation where a module has an .mli file but no
> >.ml file?
>
> Weird, this issue has come up before. From what I thought, that case is
> illegal. I'm not sure what happens at link time, do you just leave out
> the typed.cmo?
As far as I can see, there is no typed.cmo, only typed.cmi. It works.
I do not think it is illegal.
> The opposite, having a .ml file but no .mli, is fine. It is equivalent
> as far as I know (and we use it frequently).
When a module contains only type definitions, there is a choice between
having just an .ml file, just an .mli file, or even both (identical files).
Unfortunately (?), the language does not specify which is preferred. I
believe all are legal.
--
François Pottier
Francois.Pottier at inria.fr
http://cristal.inria.fr/~fpottier/
More information about the Omake
mailing list