Ocaml camlp4:没有可用的报价扩展程序

Ocaml camlp4:没有可用的报价扩展程序,ocaml,camlp4,Ocaml,Camlp4,文件test.ml只包含一行: let foo = <:expr< foo >> 输出为: File "test.ml", line 1, characters 12-24: While finding quotation "expr" in a position of "expr": There is no quotation expander available. Camlp4: Uncaught exception: Not_found 我希望该文件得到

文件
test.ml
只包含一行:

let foo = <:expr< foo >>
输出为:

File "test.ml", line 1, characters 12-24:
While finding quotation "expr" in a position of "expr":
  There is no quotation expander available.
  Camlp4: Uncaught exception: Not_found

我希望该文件得到预处理,报价单得到适当扩展。这里我忘记了什么?

对于ocaml>=3.10,您不应该使用
pa_extend.cmo
,而应该使用新的模块。它们被打包在
camlp4of
可执行文件中,您可以直接使用它来代替
camlp4
(或者
camlp4rf
,用于修改语法)

File "test.ml", line 1, characters 12-24:
While finding quotation "expr" in a position of "expr":
  There is no quotation expander available.
  Camlp4: Uncaught exception: Not_found