@cpitclaudel wrote:
Hi all,
I have a Coq file set up to create an OCaml file through extraction. The Coq file (extraction.v) is built with dune:
(coq.theory (name test) (modules Extraction))Extraction.v has just this:
Require Import Extraction. Extraction "test.ml" nat.Running
dune build Extraction.vocreates extraction.vo andtest.mlin the build directory, as expected.Now in the
ocaml/subdirectory of my main directory Imain.ml, which uses the code intest.ml, and another dune file:(executable (name main) (modules test main))At the moment, I use a custom makefile to copy the generated
test.mlfrom Dune’s build directory toocaml/, which isn’t great. How can I teach dune to understand that it needs to compileExtraction.vto generatemain.ml? And how do I ask it to copy the generatedtest.mlinto theocaml/directory?Or should I not copy
test.mlat all? (In that case, how do I just tell dune to build it by compiling Extraction.vo?Thanks!
Posts: 2
Participants: 1