package ppxlib

  1. Overview
  2. Docs
Standard library for ppx rewriters

Install

Dune Dependency

Authors

Maintainers

Sources

ppxlib-0.27.0.tbz
sha256=764b96121d6ffd6a73820e0ec5235176bfc42b94cf2ff97e32d068a5c4b28c62
sha512=2dcce0be6acdb3e185bfdad2785303a405c617f99949316abe6793f785d7227c10795ca49e79290bd385873da635191b44e8a5c211de114a168846d5d26f505c

doc/ppxlib.astlib/Astlib/Ast_metadata/index.html

Module Astlib.Ast_metadataSource

Meta data related interface for a ppx rewriter

val add_ppx_context_str : tool_name:string -> Parsetree.structure_item list -> Parsetree.structure_item list

Extract information from the current environment and encode it into an attribute which is prepended to the list of structure items in order to pass the information to an external processor.

val drop_ppx_context_str : restore:bool -> Parsetree.structure_item list -> Parsetree.structure_item list

Drop the ocaml.ppx.context attribute from a structure. If restore is true, also restore the associated data in the current process.

val add_ppx_context_sig : tool_name:string -> Parsetree.signature_item list -> Parsetree.signature_item list

Same as add_ppx_context_str, but for signatures.

val drop_ppx_context_sig : restore:bool -> Parsetree.signature_item list -> Parsetree.signature_item list

Same as drop_ppx_context_str, but for signatures.

val tool_name : unit -> string

Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldoc", "ocamldep", "ocaml", ...

Cookies

Cookies are used to pass information from a ppx processor to a further invocation of itself, when called from the OCaml toplevel (or other tools that support cookies).

OCaml

Innovation. Community. Security.

On This Page
  1. Cookies