package ppx_core

  1. Overview
  2. Docs
module Located : sig ... end
include sig ... end
val loc : Location.t
val pcl_constr : Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.core_type list -> Migrate_parsetree.OCaml_403.Ast.Parsetree.class_expr
val pcty_constr : Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.core_type list -> Migrate_parsetree.OCaml_403.Ast.Parsetree.class_type
val ptyp_constr : Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.core_type list -> Migrate_parsetree.OCaml_403.Ast.Parsetree.core_type
val ptyp_class : Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.core_type list -> Migrate_parsetree.OCaml_403.Ast.Parsetree.core_type
val ptyp_package : (Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc * (Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc * Migrate_parsetree.OCaml_403.Ast.Parsetree.core_type) list) -> Migrate_parsetree.OCaml_403.Ast.Parsetree.core_type
val pexp_ident : Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.expression
val pexp_construct : Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.expression option -> Migrate_parsetree.OCaml_403.Ast.Parsetree.expression
val pexp_field : Migrate_parsetree.OCaml_403.Ast.Parsetree.expression -> Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.expression
val pexp_new : Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.expression
val pexp_override : (string Ppx_ast__.Import.Location.loc * Migrate_parsetree.OCaml_403.Ast.Parsetree.expression) list -> Migrate_parsetree.OCaml_403.Ast.Parsetree.expression
val location : start:Lexing.position -> end_:Lexing.position -> ghost:bool -> Ppx_ast__.Import.Location.t
val module_binding : name:string Ppx_ast__.Import.Location.loc -> expr:Migrate_parsetree.OCaml_403.Ast.Parsetree.module_expr -> Migrate_parsetree.OCaml_403.Ast.Parsetree.module_binding
val module_declaration : name:string Ppx_ast__.Import.Location.loc -> type_:Migrate_parsetree.OCaml_403.Ast.Parsetree.module_type -> Migrate_parsetree.OCaml_403.Ast.Parsetree.module_declaration
val pmod_ident : Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.module_expr
val pmty_ident : Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.module_type
val pmty_alias : Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.module_type
val module_type_declaration : name:string Ppx_ast__.Import.Location.loc -> type_:Migrate_parsetree.OCaml_403.Ast.Parsetree.module_type option -> Migrate_parsetree.OCaml_403.Ast.Parsetree.module_type_declaration
val open_description : lid:Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc -> override:Migrate_parsetree.OCaml_403.Ast.Asttypes.override_flag -> Migrate_parsetree.OCaml_403.Ast.Parsetree.open_description
val ppat_var : string Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.pattern
val ppat_construct : Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.pattern option -> Migrate_parsetree.OCaml_403.Ast.Parsetree.pattern
val ppat_type : Ppx_ast__.Import.Longident.t Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.pattern
val ppat_unpack : string Ppx_ast__.Import.Location.loc -> Migrate_parsetree.OCaml_403.Ast.Parsetree.pattern
val ppat_extension : (string Ppx_ast__.Import.Location.loc * Migrate_parsetree.OCaml_403.Ast.Parsetree.payload) -> Migrate_parsetree.OCaml_403.Ast.Parsetree.pattern
val position : fname:string -> lnum:int -> bol:int -> cnum:int -> Lexing.position
val psig_extension : (string Ppx_ast__.Import.Location.loc * Migrate_parsetree.OCaml_403.Ast.Parsetree.payload) -> (string Ppx_ast__.Import.Location.loc * Migrate_parsetree.OCaml_403.Ast.Parsetree.payload) list -> Migrate_parsetree.OCaml_403.Ast.Parsetree.signature_item
val pstr_extension : (string Ppx_ast__.Import.Location.loc * Migrate_parsetree.OCaml_403.Ast.Parsetree.payload) -> (string Ppx_ast__.Import.Location.loc * Migrate_parsetree.OCaml_403.Ast.Parsetree.payload) list -> Migrate_parsetree.OCaml_403.Ast.Parsetree.structure_item
val value_description : name:string Ppx_ast__.Import.Location.loc -> type_:Migrate_parsetree.OCaml_403.Ast.Parsetree.core_type -> prim:string list -> Migrate_parsetree.OCaml_403.Ast.Parsetree.value_description

evar id produces a Pexp_ident _ expression, it parses its input so you can pass any dot-separated identifier, for instance: evar ~loc "Foo.bar".

pstr_value_list ~loc rf vbs = pstr_value ~loc rf vbs if vbs <> [], [] otherwise.

unapplied_type_constr_conv is the standard way to map identifiers to conversion fonctions, for preprocessor that creates values that follow the structure of types. More precisely, path_conv path (sprintf "sexp_of_%s") is:

  • sexp_of_t if path is "t"
  • A.B.sexp_of_foo if path is "A.B.foo"
  • A.B.sexp_of_f__foo (module A1) (module A2) if path is "A.B.F(A1)(A2).foo" type_constr_conv also applies it to a list of expression, which both prevents the compiler from allocating useless closures, and almost always what is needed, since type constructors are always applied.
OCaml

Innovation. Community. Security.