Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
ocamlbuild and automatic dependencies
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-03-16 (14:40)
From: Jacques Garrigue <garrigue@m...>
Subject: Re: [Caml-list] ocamlbuild and automatic dependencies
From: Joel Reymont <>

> It appears that simply copying foo.mli into should solve the  
> issue.
> I kind of hate having two identical files that I'll need to update.  
> Do I have to get used to it?
> 	Thanks, Joel

But... you don't need foo.mli.
So having only should be enough.
I know this may feel a bit strange, but in this case the essential
part is
Note that this is partly due to the fact foo.mli does not define a
module type, it just wraps some type definitions done in

An amusing alternative is to define a module type in foo.mli.

module type T = sig
  type t1 = ...
  type t2 = ...

Now you can define a module containing the types of Foo.T without any

module rec FT : Foo.T = FT

Of course this only works if T contains only type definitions.


Jacques Garrigue