package ppxlib

  1. Overview
  2. Docs
Standard infrastructure for ppx rewriters

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ppxlib-0.35.0.tbz
sha256=d9d959fc9f84260487e45684dc741898a92fc5506b61a7f5cac65d21832db925
sha512=e428b1e3b89261c7efdaa18016264d1afbf067cb9b0d41124b04796c2487ac7ca8ee9a24a60d56f20d1774cb44aaa9ecf1512f17455812ba8d62d4ef93616ee7

doc/ppxlib/Ppxlib/Expansion_helpers/Quoter/index.html

Module Expansion_helpers.QuoterSource

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.

Sourcetype t
Sourceval create : unit -> t

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

sanitize t e Returns e wrapped with bindings for all quoted expressions in the quoter t

OCaml

Innovation. Community. Security.