package ppxlib

  1. Overview
  2. Docs
Standard infrastructure for ppx rewriters

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ppxlib-0.37.0.tbz
sha256=2e223837e7cecc3bc84a432432c0a72f4e1d5be9165c9c33772f156db85db0b3
sha512=78c62c6de7a641b950de9b4b744841c8823918c545046693e291077adfcd069a812094c11d8d51f792c0b5f340307d38f452ff0a92520df63ed17a3ca9922e2e

doc/ppxlib/Ppxlib/Extension/V3/index.html

Module Extension.V3Source

Sourcetype nonrec t = t
Sourceval declare : string -> 'context Context.t -> (Astlib.Ast_502.Parsetree.payload, 'a, 'context) Ast_pattern.t -> (ctxt:Expansion_context.Extension.t -> 'a) -> t
Sourceval declare_inline : string -> 'context Context.t -> (Astlib.Ast_502.Parsetree.payload, 'a, 'context list) Ast_pattern.t -> (ctxt:Expansion_context.Extension.t -> 'a) -> t
Sourceval declare_with_path_arg : string -> 'context Context.t -> (Astlib.Ast_502.Parsetree.payload, 'a, 'context) Ast_pattern.t -> (ctxt:Expansion_context.Extension.t -> arg:Longident.t Ppxlib_ast.Asttypes.loc option -> 'a) -> t

Same as declare except that the extension name takes an additional path argument. The path is the part of the name that start with a capitalized component. For instance in the following, the extension "map" would receive the path argument Foo.Bar:

  let%map.Foo.Bar x = 1 in
  ...
Sourceval declare_inline_with_path_arg : string -> 'context Context.t -> (Astlib.Ast_502.Parsetree.payload, 'a, 'context list) Ast_pattern.t -> (ctxt:Expansion_context.Extension.t -> arg:Longident.t Ppxlib_ast.Asttypes.loc option -> 'a) -> t