Hi!
I have a problem with dune which probably has a very simple solution, but I haven’t been able to figure it out. My current directory setup for defining a simple library looks like this:
lib/
|--- dune
|--- lib.ml
|--- transform.ml
File lib.ml basically just includes a definition of a type t
and some pretty printing function for it. Now I would like to include a function f
that can take a value of type t
and transform it into another value of type t
. Since this is logically independent of the definition of t itself I would like for it to go into it’s own module inside the library, so I put it into transform.ml. When I try to build this with dune I get:
Error: Module Transform in directory _build/default/lib depends on Lib.
This doesn't make sense to me.
Lib is the main module of the library and is the only module exposed
outside of the library. Consequently, it should be the one depending on all
the other modules in the library.
I could put the definition of type t
into a file with a different name, but I would actually like for it to be available outside the library as Lib.t
. Is there something I’m missing here?
Thanks for any input