package ppxlib

  1. Overview
  2. Docs
Standard infrastructure for ppx rewriters

Install

dune-project
 Dependency

Authors

Maintainers

Sources

757f6c284b1fe748d5027eef3bbef924b6bbd7ce.tar.gz
sha256=89a98c95ddd0bfbac17b5a936f6811af7097be3258c482d5859b73e9de9b4552
sha512=b19306473d867252d382e58e9b697531c5edccdc9283b5eaf72f524803c2fca2a58a5e8f25bee198b00de82cf8ef805b43f7488791c3ac5beb0ffba938ded826

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