I have a project with OCaml.ml files and a Menhir.mly file. I use ocamlbuild to compile the project.
My _tags file contains this single line:
true: use_menhir, package(batteries)
Everything works well, except when I want to use Batteries in a .mly file. If I open Batteries ;; between %{ and %} in my .mly file, I get a "Error: Unbound Module Batteries" message when ocamlbuild is called.
It seems that when ocamlbuild calls menhir, like this:
/usr/bin/menhir --ocamlc '/usr/bin/ocamlfind ocamlc' --infer parser.mly
he forgets to add -package batteries (or something similar) to the --ocamlc option for menhir.
How can i fix this? Maybe a special rule for my .mly file in my _tags file might help. Or is it ocamlbuild error?
p4bl0 source share