Module Ppx_core__.Extension

type (_, _) equality =
| Eq : ('a'aequality
| Ne : (__equality
module Context : sig ... end
type t

Type of declared extensions.

val declare : Ppx_core__.Import.string ‑> 'context Context.t ‑> (Ppx_core__.Import.payload'a'contextPpx_core.Ast_pattern.t ‑> (loc:Ppx_core.Location.t ‑> path:Ppx_core__.Import.string ‑> 'a) ‑> t

declare name context pattern expander declares the extension names name for context.

expander is responsible for producing the code to replace the extension in the AST. It receives as argument:

val declare_with_path_arg : Ppx_core__.Import.string ‑> 'context Context.t ‑> (Ppx_core__.Import.payload'a'contextPpx_core.Ast_pattern.t ‑> (loc:Ppx_core.Location.t ‑> path:Ppx_core__.Import.string ‑> arg:Ppx_core.Longident.t Ppx_core__.Import.Asttypes.loc Ppx_core__.Import.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
      ...
val declare_inline : Ppx_core__.Import.string ‑> 'context Context.t ‑> (Ppx_core__.Import.payload'a'context Ppx_core__.Import.listPpx_core.Ast_pattern.t ‑> (loc:Ppx_core.Location.t ‑> path:Ppx_core__.Import.string ‑> 'a) ‑> t

Inline the result of the expansion into its parent. Only works for these contexts:

val declare_inline_with_path_arg : Ppx_core__.Import.string ‑> 'context Context.t ‑> (Ppx_core__.Import.payload'a'context Ppx_core__.Import.listPpx_core.Ast_pattern.t ‑> (loc:Ppx_core.Location.t ‑> path:Ppx_core__.Import.string ‑> arg:Ppx_core.Longident.t Ppx_core__.Import.Asttypes.loc Ppx_core__.Import.option ‑> 'a) ‑> t
module For_context : sig ... end
val filter_by_context : 'a Context.t ‑> t Ppx_core__.Import.list ‑> 'a For_context.t Ppx_core__.Import.list

Given a context and a list of extension expander, returns all the ones that are for this context.

module Expert : sig ... end
val check_unused : Ppx_core.Ast_traverse.iter
module V2 : sig ... end