Unfortunately, since the pa_comprehension package name does not end with the .syntax extension, this is a little more complicated than it should be. (The fact that this question is still not fixed shows that using pa_comprehension not very popular in modern OCaml). Thus, without proper expansion, we need to do everything manually. If your file is named pr.ml , then the correct call is:
$ ocamlbuild -use-ocamlfind -syntax camlp4o -pkg camlp4,pa_comprehension pr.native
If you do not want to enter it each time, you can create a _tags file with the following contents:
$ cat _tags <**/*> : package(camlp4),syntax(camlp4o),package(pa_comprehension)
In this case, the command line spell is a little simpler:
$ ocamlbuild -use-ocamlfind pr.native
source share