I am converting several modules based on OCaml to F# and ran into the OCaml ”Quotation.add” compiler directive for a quotation expander.
A quotation expander is a function written in OCaml. A call to the
Camlp4 library function ”Quotation.add” adds the quotation
expander.
After searching for both a quotation expander and the ”Quotation.add” compiler directive in F# books, the F# site, Google and here, the answer I get is no.
Can someone confirm that F# does not support the concept of the OCaml ”Quotation.add” compiler directive or the concept of OCaml quotation expanders.
EDIT
Note: I just learned that Camlp4 is a preprocessor-pretty-printer of OCaml, I thought it was a separate library for OCaml when I asked the question; now it makes sense.
You’re correct – the camlp4 library is not available for F#, so I’m afraid you’ll need to use another approach to re-implement the required functionality in F#.
In general, there are a couple of related technologies that you can use from F# (but it is hard to tell if any of them is useful for you without knowing more about the specific problem):