Open OlivierNicole opened 1 week ago
Thanks for raising this issue.
Indeed, we've not worked yet on handling non trivial library/module setup.
In the examples folder, I've used some awk
script to put things as Ortac/QCheck-STM expects them to be.
So at the moment, I'm afraid I don't have any other solution than a hackish one, like running a sed
script on the generated code...
But I believe that a configuration feature like module-prefix
could be handy in a number of cases.
I believe that version could do the trick.
$ dune exec --display=quiet -- ortac qcheck-stm ../test_int31/int31.mli ../test_int31/ortac_conf.ml --module-prefix=Bob --quiet | head
(* This file is generated by ortac qcheck-stm,
edit how you run the tool instead *)
[@@@ocaml.warning "-26-27-69-32-38"]
open Bob.Int31
module Ortac_runtime = Ortac_runtime_qcheck_stm
let in_range i =
try
let __t1__001_ =
Ortac_runtime.Gospelstdlib.(<=)
(Ortac_runtime.Gospelstdlib.(~-)
What do you think?
How to reproduce
Unpack test_int31.tar.gz and:
The problem here is that given the Dune structure of my project, I would need Ortac to generate
open Int31lib.Int31
at the top, instead ofopen Int31
. Is there a way to fix this?