I want to create two executable files that share a single module arith_inst
. Here is what I tried to do in my dune
file:
(executable
(public_name arith)
(name arith_interp)
(modules arith arith_inst arith_interp)
(modes byte)
(libraries necromonads))
(executable
(public_name arith_div)
(name arith_div_interp)
(modules arith_div arith_inst arith_div_interp)
(modes byte)
(libraries necromonads))
This fails because I am including the same module in two executable (which is exactly what I want to do). If I remove the modules
stanza, I get an error about arith_interp
being used in both executable (which is false, only the first one needs it).
What is the dune way to have a project with several executable files sharing some modules?
9 posts - 5 participants