开发者

camlp4 : there is no quotation expander available

开发者 https://www.devze.com 2023-02-17 07:18 出处:网络
The file test.ml contains only one line: let foo = <:expr< foo >> I then apply camlp4 to that file with this command line:

The file test.ml contains only one line:

let foo = <:expr< foo >>

I then apply camlp4 to that file with this command line:

camlp4o pa_extend.cmo test.ml

The output is:

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

I expected the file to be p开发者_如何学Cre-processed and the quotation to be expanded appropriately. What am I forgetting here?


With ocaml >= 3.10, you should not use pa_extend.cmo but the new quotations modules. They are packed in the camlp4of executable that you can use directly instead of camlp4 (or camlp4rf for revised syntax).

0

精彩评论

暂无评论...
验证码 换一张
取 消