package ppxlib
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=5aba1bce14c53108614130110c843d004bf93bd2cf3a0778fd7086b85390a434
sha512=1e3e8fee42fe74bffc178dbcbb2db8ec38dd23e71f6fed3c4c92618cf93892f5847787e6e9abb322f5c85d29a76afde28ce840b42e10fedc14cd82ba578ad06a
doc/ppxlib/Ppxlib/Expansion_helpers/Quoter/index.html
Module Expansion_helpers.Quoter
Source
Generate expressions in a hygienic way.
The idea is that whenever we want to refer to an expression in generated code we first quote it. The result will be an identifier that is guaranteed to refer to the expression it was created from. This way it is impossible for quoted fragments to refer to newly introduced expressions.
For more information, see the section on quoting in the good practices section.
Creates a quoter. A quoter guarantees to give names that do not clash with any other names used before
quote t e
returns the expression that is safe to use in place of e
in generated code
val sanitize :
t ->
Astlib.Ast_502.Parsetree.expression ->
Astlib.Ast_502.Parsetree.expression
sanitize t e
Returns e
wrapped with bindings for all quoted expressions in the quoter t