I use Merlin with Emacs to edit OCaml code. It normally works perfectly fine, but I wound the following problem:
I'm need to use a package, built by someone else, that adds to OCaml some keywords not native to the language. Since I use the package to compile the code, compilation works great. On the other hand Merlin goes crazy and thinks that the new keywords are an error. Luckily the new keywords only appear at the beginning of a line, so my code looks something like this:
let square x = x * x;;
let rec fact x =
if x <= 1 then 1 else x * fact (x - 1);;
FOO "This syntax is not standard Ocaml" square fact;;
Where FOO
is the new keyword. Merlin will complain and say Unbound constructor FOO
. So the question is, can I make Marlin ignore that line? OR can you think of a hack to wrap the syntax in something Merlin won't complain about?