package ppxlib

  1. Overview
  2. Docs
Standard infrastructure for ppx rewriters

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ppxlib-0.38.0.tbz
sha256=89e049b3102f6670a213d34d802ea3ab0fc530a8959d2f1a1e8db830063429a3
sha512=2fbbf124fc61e1f22242d13505e9af39d4a3c7cf03def1c33ee8bd915195be9b817636667302e9c6ceddc74a9a4a54926340e21c96fd770a2bc6752400315cfd

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