Unfortunately, since pa_comprehension
package name is not ended with .syntax
extension, this is a little bit harder than it should be. (The fact that this issue is still not fixed, shows that using pa_comprehension
is not very popular in modern OCaml). So, without the proper extension, we need to do everything manually. If your file is named pr.ml
, then the correct invocation is:
$ ocamlbuild -use-ocamlfind -syntax camlp4o -pkg camlp4,pa_comprehension pr.native
If you don't wan't to type it every time, then you can create _tags
file, with the following contents:
$ cat _tags
<**/*> : package(camlp4),syntax(camlp4o),package(pa_comprehension)
In that case, the command line spell is a little bit easier:
$ ocamlbuild -use-ocamlfind pr.native