Module Ppxlib__Extension
module Context : sig ... endval declare : Ppxlib__.Import.string -> 'context Context.t -> (Ppxlib__.Import.payload, 'a, 'context) Ppxlib.Ast_pattern.t -> (loc:Ppxlib.Location.t -> path:Ppxlib__.Import.string -> 'a) -> tdeclare name context pattern expanderdeclares the extension namesnameforcontext.expanderis responsible for producing the code to replace the extension in the AST. It receives as argument:loc: the location of the enclosing node. For instance for expression it is thepexp_locfieldpath: the current module path
val declare_with_path_arg : Ppxlib__.Import.string -> 'context Context.t -> (Ppxlib__.Import.payload, 'a, 'context) Ppxlib.Ast_pattern.t -> (loc:Ppxlib.Location.t -> path:Ppxlib__.Import.string -> arg:Ppxlib.Longident.t Ppxlib__.Import.Asttypes.loc Ppxlib__.Import.option -> 'a) -> tSame as
declareexcept 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 argumentFoo.Bar:let%map.Foo.Bar x = 1 in ...
val declare_inline : Ppxlib__.Import.string -> 'context Context.t -> (Ppxlib__.Import.payload, 'a, 'context Ppxlib__.Import.list) Ppxlib.Ast_pattern.t -> (loc:Ppxlib.Location.t -> path:Ppxlib__.Import.string -> 'a) -> tInline the result of the expansion into its parent. Only works for these contexts:
class_fieldclass_type_fieldsignature_itemstructure_item
val declare_inline_with_path_arg : Ppxlib__.Import.string -> 'context Context.t -> (Ppxlib__.Import.payload, 'a, 'context Ppxlib__.Import.list) Ppxlib.Ast_pattern.t -> (loc:Ppxlib.Location.t -> path:Ppxlib__.Import.string -> arg:Ppxlib.Longident.t Ppxlib__.Import.Asttypes.loc Ppxlib__.Import.option -> 'a) -> t
module For_context : sig ... endval filter_by_context : 'a Context.t -> t Ppxlib__.Import.list -> 'a For_context.t Ppxlib__.Import.listGiven a context and a list of extension expander, returns all the ones that are for this context.
module Expert : sig ... endval check_unused : Ppxlib.Ast_traverse.iter
module V2 : sig ... endmodule V3 : sig ... end