Camlp4: no quote expanders available

The test.ml file contains only one line:

 let foo = <:expr< foo >> 

Then I apply camlp4 to this file using this command line:

 camlp4o pa_extend.cmo test.ml 

Output:

 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 pre-processed, and the quote should be appropriately expanded. What did I forget here?

+4
source share
1 answer

With ocaml> = 3.10 you should not use pa_extend.cmo , but new quote modules. They are packaged in the camlp4of , which can be used directly instead of camlp4 (or camlp4rf for the revised syntax).

+6
source

Source: https://habr.com/ru/post/1343896/


All Articles