Quantcast
Channel: OCaml - Topics tagged dune
Viewing all articles
Browse latest Browse all 521

Dune - How To Export All Modules In Folder

$
0
0

I have a project where I want to access all the modules in a directory from different packages. Currently, the directory in question is like:

dir
|- a.ml
|- b.ml
|- c.ml
|- lib.ml

Instead, of writing the following in lib, the main export of the directory:

module A = A
module B = B
module C = C

I use the following in my dune file:

(library
   (name lib)
   (modules a b c))

Is there any wildcard or regex I can use with Dune to specify “export all the modules in this folder as visible”? Instead of specifying every file by hand. I haven’t really found anything in the documentation about this

Thanks!

3 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 521

Trending Articles