Module Ast_builder.Default

Helpers taking a ~loc argument. This module is meant to be opened or aliased.

module Located : Ppxlib__.Ast_builder_intf.Located with type 'a with_loc := 'a Ppxlib__.Ast_builder_intf.with_location
include module type of Ppxlib__.Ast_builder_generated.M
val attribute : loc:Ppxlib__.Import.location -> name:string Ppxlib__.Import.loc -> payload:Ppxlib__.Import.payload -> Ppxlib__.Import.attribute
val binding_op : loc:Ppxlib__.Import.location -> op:string Ppxlib__.Import.loc -> pat:Ppxlib__.Import.pattern -> exp:Ppxlib__.Import.expression -> Ppxlib__.Import.binding_op
val case : lhs:Ppxlib__.Import.pattern -> guard:Ppxlib__.Import.expression option -> rhs:Ppxlib__.Import.expression -> Ppxlib__.Import.case
val pcl_constr : loc:Ppxlib__.Import.location -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.core_type list -> Ppxlib__.Import.class_expr
val pcl_structure : loc:Ppxlib__.Import.location -> Ppxlib__.Import.class_structure -> Ppxlib__.Import.class_expr
val pcl_fun : loc:Ppxlib__.Import.location -> Ppxlib__.Import.arg_label -> Ppxlib__.Import.expression option -> Ppxlib__.Import.pattern -> Ppxlib__.Import.class_expr -> Ppxlib__.Import.class_expr
val pcl_apply : loc:Ppxlib__.Import.location -> Ppxlib__.Import.class_expr -> (Ppxlib__.Import.arg_label * Ppxlib__.Import.expression) list -> Ppxlib__.Import.class_expr
val pcl_let : loc:Ppxlib__.Import.location -> Ppxlib__.Import.rec_flag -> Ppxlib__.Import.value_binding list -> Ppxlib__.Import.class_expr -> Ppxlib__.Import.class_expr
val pcl_constraint : loc:Ppxlib__.Import.location -> Ppxlib__.Import.class_expr -> Ppxlib__.Import.class_type -> Ppxlib__.Import.class_expr
val pcl_extension : loc:Ppxlib__.Import.location -> Ppxlib__.Import.extension -> Ppxlib__.Import.class_expr
val pcl_open : loc:Ppxlib__.Import.location -> Ppxlib__.Import.open_description -> Ppxlib__.Import.class_expr -> Ppxlib__.Import.class_expr
val pcf_inherit : loc:Ppxlib__.Import.location -> Ppxlib__.Import.override_flag -> Ppxlib__.Import.class_expr -> string Ppxlib__.Import.loc option -> Ppxlib__.Import.class_field
val pcf_val : loc:Ppxlib__.Import.location -> (Ppxlib__.Import.label Ppxlib__.Import.loc * Ppxlib__.Import.mutable_flag * Ppxlib__.Import.class_field_kind) -> Ppxlib__.Import.class_field
val pcf_method : loc:Ppxlib__.Import.location -> (Ppxlib__.Import.label Ppxlib__.Import.loc * Ppxlib__.Import.private_flag * Ppxlib__.Import.class_field_kind) -> Ppxlib__.Import.class_field
val pcf_constraint : loc:Ppxlib__.Import.location -> (Ppxlib__.Import.core_type * Ppxlib__.Import.core_type) -> Ppxlib__.Import.class_field
val pcf_initializer : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.class_field
val pcf_attribute : loc:Ppxlib__.Import.location -> Ppxlib__.Import.attribute -> Ppxlib__.Import.class_field
val pcf_extension : loc:Ppxlib__.Import.location -> Ppxlib__.Import.extension -> Ppxlib__.Import.class_field
val class_infos : loc:Ppxlib__.Import.location -> virt:Ppxlib__.Import.virtual_flag -> params:(Ppxlib__.Import.core_type * (Ppxlib__.Import.variance * Ppxlib__.Import.injectivity)) list -> name:string Ppxlib__.Import.loc -> expr:'a -> 'a Ppxlib__.Import.class_infos
val class_signature : self:Ppxlib__.Import.core_type -> fields:Ppxlib__.Import.class_type_field list -> Ppxlib__.Import.class_signature
val class_structure : self:Ppxlib__.Import.pattern -> fields:Ppxlib__.Import.class_field list -> Ppxlib__.Import.class_structure
val pcty_constr : loc:Ppxlib__.Import.location -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.core_type list -> Ppxlib__.Import.class_type
val pcty_signature : loc:Ppxlib__.Import.location -> Ppxlib__.Import.class_signature -> Ppxlib__.Import.class_type
val pcty_arrow : loc:Ppxlib__.Import.location -> Ppxlib__.Import.arg_label -> Ppxlib__.Import.core_type -> Ppxlib__.Import.class_type -> Ppxlib__.Import.class_type
val pcty_extension : loc:Ppxlib__.Import.location -> Ppxlib__.Import.extension -> Ppxlib__.Import.class_type
val pcty_open : loc:Ppxlib__.Import.location -> Ppxlib__.Import.open_description -> Ppxlib__.Import.class_type -> Ppxlib__.Import.class_type
val pctf_inherit : loc:Ppxlib__.Import.location -> Ppxlib__.Import.class_type -> Ppxlib__.Import.class_type_field
val pctf_val : loc:Ppxlib__.Import.location -> (Ppxlib__.Import.label Ppxlib__.Import.loc * Ppxlib__.Import.mutable_flag * Ppxlib__.Import.virtual_flag * Ppxlib__.Import.core_type) -> Ppxlib__.Import.class_type_field
val pctf_method : loc:Ppxlib__.Import.location -> (Ppxlib__.Import.label Ppxlib__.Import.loc * Ppxlib__.Import.private_flag * Ppxlib__.Import.virtual_flag * Ppxlib__.Import.core_type) -> Ppxlib__.Import.class_type_field
val pctf_constraint : loc:Ppxlib__.Import.location -> (Ppxlib__.Import.core_type * Ppxlib__.Import.core_type) -> Ppxlib__.Import.class_type_field
val pctf_attribute : loc:Ppxlib__.Import.location -> Ppxlib__.Import.attribute -> Ppxlib__.Import.class_type_field
val pctf_extension : loc:Ppxlib__.Import.location -> Ppxlib__.Import.extension -> Ppxlib__.Import.class_type_field
val constructor_declaration : loc:Ppxlib__.Import.location -> name:string Ppxlib__.Import.loc -> args:Ppxlib__.Import.constructor_arguments -> res:Ppxlib__.Import.core_type option -> Ppxlib__.Import.constructor_declaration
val ptyp_any : loc:Ppxlib__.Import.location -> Ppxlib__.Import.core_type
val ptyp_var : loc:Ppxlib__.Import.location -> string -> Ppxlib__.Import.core_type
val ptyp_arrow : loc:Ppxlib__.Import.location -> Ppxlib__.Import.arg_label -> Ppxlib__.Import.core_type -> Ppxlib__.Import.core_type -> Ppxlib__.Import.core_type
val ptyp_tuple : loc:Ppxlib__.Import.location -> Ppxlib__.Import.core_type list -> Ppxlib__.Import.core_type
val ptyp_constr : loc:Ppxlib__.Import.location -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.core_type list -> Ppxlib__.Import.core_type
val ptyp_object : loc:Ppxlib__.Import.location -> Ppxlib__.Import.object_field list -> Ppxlib__.Import.closed_flag -> Ppxlib__.Import.core_type
val ptyp_class : loc:Ppxlib__.Import.location -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.core_type list -> Ppxlib__.Import.core_type
val ptyp_alias : loc:Ppxlib__.Import.location -> Ppxlib__.Import.core_type -> string -> Ppxlib__.Import.core_type
val ptyp_variant : loc:Ppxlib__.Import.location -> Ppxlib__.Import.row_field list -> Ppxlib__.Import.closed_flag -> Ppxlib__.Import.label list option -> Ppxlib__.Import.core_type
val ptyp_poly : loc:Ppxlib__.Import.location -> string Ppxlib__.Import.loc list -> Ppxlib__.Import.core_type -> Ppxlib__.Import.core_type
val ptyp_package : loc:Ppxlib__.Import.location -> Ppxlib__.Import.package_type -> Ppxlib__.Import.core_type
val ptyp_extension : loc:Ppxlib__.Import.location -> Ppxlib__.Import.extension -> Ppxlib__.Import.core_type
val pdir_string : loc:Ppxlib__.Import.location -> string -> Ppxlib__.Import.directive_argument
val pdir_int : loc:Ppxlib__.Import.location -> string -> char option -> Ppxlib__.Import.directive_argument
val pdir_ident : loc:Ppxlib__.Import.location -> Ppxlib__.Import.longident -> Ppxlib__.Import.directive_argument
val pdir_bool : loc:Ppxlib__.Import.location -> bool -> Ppxlib__.Import.directive_argument
val pexp_ident : loc:Ppxlib__.Import.location -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.expression
val pexp_constant : loc:Ppxlib__.Import.location -> Ppxlib__.Import.constant -> Ppxlib__.Import.expression
val pexp_let : loc:Ppxlib__.Import.location -> Ppxlib__.Import.rec_flag -> Ppxlib__.Import.value_binding list -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression
val pexp_function : loc:Ppxlib__.Import.location -> Ppxlib__.Import.cases -> Ppxlib__.Import.expression
val pexp_fun : loc:Ppxlib__.Import.location -> Ppxlib__.Import.arg_label -> Ppxlib__.Import.expression option -> Ppxlib__.Import.pattern -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression
val pexp_apply : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> (Ppxlib__.Import.arg_label * Ppxlib__.Import.expression) list -> Ppxlib__.Import.expression
val pexp_match : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.cases -> Ppxlib__.Import.expression
val pexp_try : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.cases -> Ppxlib__.Import.expression
val pexp_tuple : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression list -> Ppxlib__.Import.expression
val pexp_construct : loc:Ppxlib__.Import.location -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.expression option -> Ppxlib__.Import.expression
val pexp_variant : loc:Ppxlib__.Import.location -> Ppxlib__.Import.label -> Ppxlib__.Import.expression option -> Ppxlib__.Import.expression
val pexp_record : loc:Ppxlib__.Import.location -> (Ppxlib__.Import.longident_loc * Ppxlib__.Import.expression) list -> Ppxlib__.Import.expression option -> Ppxlib__.Import.expression
val pexp_field : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.expression
val pexp_setfield : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression
val pexp_array : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression list -> Ppxlib__.Import.expression
val pexp_ifthenelse : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression option -> Ppxlib__.Import.expression
val pexp_sequence : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression
val pexp_while : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression
val pexp_for : loc:Ppxlib__.Import.location -> Ppxlib__.Import.pattern -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression -> Ppxlib__.Import.direction_flag -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression
val pexp_constraint : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.core_type -> Ppxlib__.Import.expression
val pexp_coerce : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.core_type option -> Ppxlib__.Import.core_type -> Ppxlib__.Import.expression
val pexp_send : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.label Ppxlib__.Import.loc -> Ppxlib__.Import.expression
val pexp_new : loc:Ppxlib__.Import.location -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.expression
val pexp_setinstvar : loc:Ppxlib__.Import.location -> Ppxlib__.Import.label Ppxlib__.Import.loc -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression
val pexp_override : loc:Ppxlib__.Import.location -> (Ppxlib__.Import.label Ppxlib__.Import.loc * Ppxlib__.Import.expression) list -> Ppxlib__.Import.expression
val pexp_letmodule : loc:Ppxlib__.Import.location -> string option Ppxlib__.Import.loc -> Ppxlib__.Import.module_expr -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression
val pexp_letexception : loc:Ppxlib__.Import.location -> Ppxlib__.Import.extension_constructor -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression
val pexp_assert : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression
val pexp_lazy : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression
val pexp_poly : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.core_type option -> Ppxlib__.Import.expression
val pexp_object : loc:Ppxlib__.Import.location -> Ppxlib__.Import.class_structure -> Ppxlib__.Import.expression
val pexp_newtype : loc:Ppxlib__.Import.location -> string Ppxlib__.Import.loc -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression
val pexp_pack : loc:Ppxlib__.Import.location -> Ppxlib__.Import.module_expr -> Ppxlib__.Import.expression
val pexp_open : loc:Ppxlib__.Import.location -> Ppxlib__.Import.open_declaration -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression
val pexp_letop : loc:Ppxlib__.Import.location -> Ppxlib__.Import.letop -> Ppxlib__.Import.expression
val pexp_extension : loc:Ppxlib__.Import.location -> Ppxlib__.Import.extension -> Ppxlib__.Import.expression
val pexp_unreachable : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression
val extension_constructor : loc:Ppxlib__.Import.location -> name:string Ppxlib__.Import.loc -> kind:Ppxlib__.Import.extension_constructor_kind -> Ppxlib__.Import.extension_constructor
val include_infos : loc:Ppxlib__.Import.location -> 'a -> 'a Ppxlib__.Import.include_infos
val label_declaration : loc:Ppxlib__.Import.location -> name:string Ppxlib__.Import.loc -> mutable_:Ppxlib__.Import.mutable_flag -> type_:Ppxlib__.Import.core_type -> Ppxlib__.Import.label_declaration
val letop : let_:Ppxlib__.Import.binding_op -> ands:Ppxlib__.Import.binding_op list -> body:Ppxlib__.Import.expression -> Ppxlib__.Import.letop
val location : start:Ppxlib__.Import.position -> end_:Ppxlib__.Import.position -> ghost:bool -> Ppxlib__.Import.location
val module_binding : loc:Ppxlib__.Import.location -> name:string option Ppxlib__.Import.loc -> expr:Ppxlib__.Import.module_expr -> Ppxlib__.Import.module_binding
val module_declaration : loc:Ppxlib__.Import.location -> name:string option Ppxlib__.Import.loc -> type_:Ppxlib__.Import.module_type -> Ppxlib__.Import.module_declaration
val pmod_ident : loc:Ppxlib__.Import.location -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.module_expr
val pmod_structure : loc:Ppxlib__.Import.location -> Ppxlib__.Import.structure -> Ppxlib__.Import.module_expr
val pmod_functor : loc:Ppxlib__.Import.location -> Ppxlib__.Import.functor_parameter -> Ppxlib__.Import.module_expr -> Ppxlib__.Import.module_expr
val pmod_apply : loc:Ppxlib__.Import.location -> Ppxlib__.Import.module_expr -> Ppxlib__.Import.module_expr -> Ppxlib__.Import.module_expr
val pmod_constraint : loc:Ppxlib__.Import.location -> Ppxlib__.Import.module_expr -> Ppxlib__.Import.module_type -> Ppxlib__.Import.module_expr
val pmod_unpack : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.module_expr
val pmod_extension : loc:Ppxlib__.Import.location -> Ppxlib__.Import.extension -> Ppxlib__.Import.module_expr
val module_substitution : loc:Ppxlib__.Import.location -> name:string Ppxlib__.Import.loc -> manifest:Ppxlib__.Import.longident_loc -> Ppxlib__.Import.module_substitution
val pmty_ident : loc:Ppxlib__.Import.location -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.module_type
val pmty_signature : loc:Ppxlib__.Import.location -> Ppxlib__.Import.signature -> Ppxlib__.Import.module_type
val pmty_functor : loc:Ppxlib__.Import.location -> Ppxlib__.Import.functor_parameter -> Ppxlib__.Import.module_type -> Ppxlib__.Import.module_type
val pmty_with : loc:Ppxlib__.Import.location -> Ppxlib__.Import.module_type -> Ppxlib__.Import.with_constraint list -> Ppxlib__.Import.module_type
val pmty_typeof : loc:Ppxlib__.Import.location -> Ppxlib__.Import.module_expr -> Ppxlib__.Import.module_type
val pmty_extension : loc:Ppxlib__.Import.location -> Ppxlib__.Import.extension -> Ppxlib__.Import.module_type
val pmty_alias : loc:Ppxlib__.Import.location -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.module_type
val module_type_declaration : loc:Ppxlib__.Import.location -> name:string Ppxlib__.Import.loc -> type_:Ppxlib__.Import.module_type option -> Ppxlib__.Import.module_type_declaration
val otag : loc:Ppxlib__.Import.location -> Ppxlib__.Import.label Ppxlib__.Import.loc -> Ppxlib__.Import.core_type -> Ppxlib__.Import.object_field
val oinherit : loc:Ppxlib__.Import.location -> Ppxlib__.Import.core_type -> Ppxlib__.Import.object_field
val open_infos : loc:Ppxlib__.Import.location -> expr:'a -> override:Ppxlib__.Import.override_flag -> 'a Ppxlib__.Import.open_infos
val ppat_any : loc:Ppxlib__.Import.location -> Ppxlib__.Import.pattern
val ppat_var : loc:Ppxlib__.Import.location -> string Ppxlib__.Import.loc -> Ppxlib__.Import.pattern
val ppat_alias : loc:Ppxlib__.Import.location -> Ppxlib__.Import.pattern -> string Ppxlib__.Import.loc -> Ppxlib__.Import.pattern
val ppat_constant : loc:Ppxlib__.Import.location -> Ppxlib__.Import.constant -> Ppxlib__.Import.pattern
val ppat_interval : loc:Ppxlib__.Import.location -> Ppxlib__.Import.constant -> Ppxlib__.Import.constant -> Ppxlib__.Import.pattern
val ppat_tuple : loc:Ppxlib__.Import.location -> Ppxlib__.Import.pattern list -> Ppxlib__.Import.pattern
val ppat_construct : loc:Ppxlib__.Import.location -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.pattern option -> Ppxlib__.Import.pattern
val ppat_variant : loc:Ppxlib__.Import.location -> Ppxlib__.Import.label -> Ppxlib__.Import.pattern option -> Ppxlib__.Import.pattern
val ppat_record : loc:Ppxlib__.Import.location -> (Ppxlib__.Import.longident_loc * Ppxlib__.Import.pattern) list -> Ppxlib__.Import.closed_flag -> Ppxlib__.Import.pattern
val ppat_array : loc:Ppxlib__.Import.location -> Ppxlib__.Import.pattern list -> Ppxlib__.Import.pattern
val ppat_or : loc:Ppxlib__.Import.location -> Ppxlib__.Import.pattern -> Ppxlib__.Import.pattern -> Ppxlib__.Import.pattern
val ppat_constraint : loc:Ppxlib__.Import.location -> Ppxlib__.Import.pattern -> Ppxlib__.Import.core_type -> Ppxlib__.Import.pattern
val ppat_type : loc:Ppxlib__.Import.location -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.pattern
val ppat_lazy : loc:Ppxlib__.Import.location -> Ppxlib__.Import.pattern -> Ppxlib__.Import.pattern
val ppat_unpack : loc:Ppxlib__.Import.location -> string option Ppxlib__.Import.loc -> Ppxlib__.Import.pattern
val ppat_exception : loc:Ppxlib__.Import.location -> Ppxlib__.Import.pattern -> Ppxlib__.Import.pattern
val ppat_extension : loc:Ppxlib__.Import.location -> Ppxlib__.Import.extension -> Ppxlib__.Import.pattern
val ppat_open : loc:Ppxlib__.Import.location -> Ppxlib__.Import.longident_loc -> Ppxlib__.Import.pattern -> Ppxlib__.Import.pattern
val position : fname:string -> lnum:int -> bol:int -> cnum:int -> Ppxlib__.Import.position
val rtag : loc:Ppxlib__.Import.location -> Ppxlib__.Import.label Ppxlib__.Import.loc -> bool -> Ppxlib__.Import.core_type list -> Ppxlib__.Import.row_field
val rinherit : loc:Ppxlib__.Import.location -> Ppxlib__.Import.core_type -> Ppxlib__.Import.row_field
val psig_value : loc:Ppxlib__.Import.location -> Ppxlib__.Import.value_description -> Ppxlib__.Import.signature_item
val psig_type : loc:Ppxlib__.Import.location -> Ppxlib__.Import.rec_flag -> Ppxlib__.Import.type_declaration list -> Ppxlib__.Import.signature_item
val psig_typesubst : loc:Ppxlib__.Import.location -> Ppxlib__.Import.type_declaration list -> Ppxlib__.Import.signature_item
val psig_typext : loc:Ppxlib__.Import.location -> Ppxlib__.Import.type_extension -> Ppxlib__.Import.signature_item
val psig_exception : loc:Ppxlib__.Import.location -> Ppxlib__.Import.type_exception -> Ppxlib__.Import.signature_item
val psig_module : loc:Ppxlib__.Import.location -> Ppxlib__.Import.module_declaration -> Ppxlib__.Import.signature_item
val psig_modsubst : loc:Ppxlib__.Import.location -> Ppxlib__.Import.module_substitution -> Ppxlib__.Import.signature_item
val psig_recmodule : loc:Ppxlib__.Import.location -> Ppxlib__.Import.module_declaration list -> Ppxlib__.Import.signature_item
val psig_modtype : loc:Ppxlib__.Import.location -> Ppxlib__.Import.module_type_declaration -> Ppxlib__.Import.signature_item
val psig_open : loc:Ppxlib__.Import.location -> Ppxlib__.Import.open_description -> Ppxlib__.Import.signature_item
val psig_include : loc:Ppxlib__.Import.location -> Ppxlib__.Import.include_description -> Ppxlib__.Import.signature_item
val psig_class : loc:Ppxlib__.Import.location -> Ppxlib__.Import.class_description list -> Ppxlib__.Import.signature_item
val psig_class_type : loc:Ppxlib__.Import.location -> Ppxlib__.Import.class_type_declaration list -> Ppxlib__.Import.signature_item
val psig_attribute : loc:Ppxlib__.Import.location -> Ppxlib__.Import.attribute -> Ppxlib__.Import.signature_item
val psig_extension : loc:Ppxlib__.Import.location -> Ppxlib__.Import.extension -> Ppxlib__.Import.attributes -> Ppxlib__.Import.signature_item
val pstr_eval : loc:Ppxlib__.Import.location -> Ppxlib__.Import.expression -> Ppxlib__.Import.attributes -> Ppxlib__.Import.structure_item
val pstr_value : loc:Ppxlib__.Import.location -> Ppxlib__.Import.rec_flag -> Ppxlib__.Import.value_binding list -> Ppxlib__.Import.structure_item
val pstr_primitive : loc:Ppxlib__.Import.location -> Ppxlib__.Import.value_description -> Ppxlib__.Import.structure_item
val pstr_type : loc:Ppxlib__.Import.location -> Ppxlib__.Import.rec_flag -> Ppxlib__.Import.type_declaration list -> Ppxlib__.Import.structure_item
val pstr_typext : loc:Ppxlib__.Import.location -> Ppxlib__.Import.type_extension -> Ppxlib__.Import.structure_item
val pstr_exception : loc:Ppxlib__.Import.location -> Ppxlib__.Import.type_exception -> Ppxlib__.Import.structure_item
val pstr_module : loc:Ppxlib__.Import.location -> Ppxlib__.Import.module_binding -> Ppxlib__.Import.structure_item
val pstr_recmodule : loc:Ppxlib__.Import.location -> Ppxlib__.Import.module_binding list -> Ppxlib__.Import.structure_item
val pstr_modtype : loc:Ppxlib__.Import.location -> Ppxlib__.Import.module_type_declaration -> Ppxlib__.Import.structure_item
val pstr_open : loc:Ppxlib__.Import.location -> Ppxlib__.Import.open_declaration -> Ppxlib__.Import.structure_item
val pstr_class : loc:Ppxlib__.Import.location -> Ppxlib__.Import.class_declaration list -> Ppxlib__.Import.structure_item
val pstr_class_type : loc:Ppxlib__.Import.location -> Ppxlib__.Import.class_type_declaration list -> Ppxlib__.Import.structure_item
val pstr_include : loc:Ppxlib__.Import.location -> Ppxlib__.Import.include_declaration -> Ppxlib__.Import.structure_item
val pstr_attribute : loc:Ppxlib__.Import.location -> Ppxlib__.Import.attribute -> Ppxlib__.Import.structure_item
val pstr_extension : loc:Ppxlib__.Import.location -> Ppxlib__.Import.extension -> Ppxlib__.Import.attributes -> Ppxlib__.Import.structure_item
val toplevel_directive : loc:Ppxlib__.Import.location -> name:string Ppxlib__.Import.loc -> arg:Ppxlib__.Import.directive_argument option -> Ppxlib__.Import.toplevel_directive
val type_declaration : loc:Ppxlib__.Import.location -> name:string Ppxlib__.Import.loc -> params:(Ppxlib__.Import.core_type * (Ppxlib__.Import.variance * Ppxlib__.Import.injectivity)) list -> cstrs:(Ppxlib__.Import.core_type * Ppxlib__.Import.core_type * Ppxlib__.Import.location) list -> kind:Ppxlib__.Import.type_kind -> private_:Ppxlib__.Import.private_flag -> manifest:Ppxlib__.Import.core_type option -> Ppxlib__.Import.type_declaration
val type_exception : loc:Ppxlib__.Import.location -> Ppxlib__.Import.extension_constructor -> Ppxlib__.Import.type_exception
val type_extension : loc:Ppxlib__.Import.location -> path:Ppxlib__.Import.longident_loc -> params:(Ppxlib__.Import.core_type * (Ppxlib__.Import.variance * Ppxlib__.Import.injectivity)) list -> constructors:Ppxlib__.Import.extension_constructor list -> private_:Ppxlib__.Import.private_flag -> Ppxlib__.Import.type_extension
val value_binding : loc:Ppxlib__.Import.location -> pat:Ppxlib__.Import.pattern -> expr:Ppxlib__.Import.expression -> Ppxlib__.Import.value_binding
val value_description : loc:Ppxlib__.Import.location -> name:string Ppxlib__.Import.loc -> type_:Ppxlib__.Import.core_type -> prim:string list -> Ppxlib__.Import.value_description
include Ppxlib__.Ast_builder_intf.Additional_helpers with type 'a with_loc := 'a Ppxlib__.Ast_builder_intf.with_location
type 'a with_loc
val eint : (int -> Ppxlib__.Import.expression) with_loc
val echar : (char -> Ppxlib__.Import.expression) with_loc
val estring : (string -> Ppxlib__.Import.expression) with_loc
val efloat : (string -> Ppxlib__.Import.expression) with_loc
val eint32 : (int32 -> Ppxlib__.Import.expression) with_loc
val eint64 : (int64 -> Ppxlib__.Import.expression) with_loc
val enativeint : (nativeint -> Ppxlib__.Import.expression) with_loc
val ebool : (bool -> Ppxlib__.Import.expression) with_loc
val pint : (int -> Ppxlib__.Import.pattern) with_loc
val pchar : (char -> Ppxlib__.Import.pattern) with_loc
val pstring : (string -> Ppxlib__.Import.pattern) with_loc
val pfloat : (string -> Ppxlib__.Import.pattern) with_loc
val pint32 : (int32 -> Ppxlib__.Import.pattern) with_loc
val pint64 : (int64 -> Ppxlib__.Import.pattern) with_loc
val pnativeint : (nativeint -> Ppxlib__.Import.pattern) with_loc
val pbool : (bool -> Ppxlib__.Import.pattern) with_loc
val eunit : Ppxlib__.Import.expression with_loc
val punit : Ppxlib__.Import.pattern with_loc
val evar : (string -> Ppxlib__.Import.expression) with_loc

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".

val pvar : (string -> Ppxlib__.Import.pattern) with_loc
val eapply : (Ppxlib__.Import.expression -> Ppxlib__.Import.expression list -> Ppxlib__.Import.expression) with_loc

Same as pexp_apply but without labels

val eabstract : (Ppxlib__.Import.pattern list -> Ppxlib__.Import.expression -> Ppxlib__.Import.expression) with_loc
val esequence : (Ppxlib__.Import.expression list -> Ppxlib__.Import.expression) with_loc
val ppat_tuple_opt : (Ppxlib__.Import.pattern list -> Ppxlib__.Import.pattern option) with_loc
val pexp_tuple_opt : (Ppxlib__.Import.expression list -> Ppxlib__.Import.expression option) with_loc
val pconstruct : Ppxlib__.Import.constructor_declaration -> Ppxlib__.Import.pattern option -> Ppxlib__.Import.pattern
val econstruct : Ppxlib__.Import.constructor_declaration -> Ppxlib__.Import.expression option -> Ppxlib__.Import.expression
val elist : (Ppxlib__.Import.expression list -> Ppxlib__.Import.expression) with_loc
val plist : (Ppxlib__.Import.pattern list -> Ppxlib__.Import.pattern) with_loc
val pstr_value_list : loc:Location.t -> Ppxlib__.Import.Asttypes.rec_flag -> Ppxlib__.Import.value_binding list -> Ppxlib__.Import.structure_item list

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

val nonrec_type_declaration : (name:string Loc.t -> params:(Ppxlib__.Import.core_type * Ppxlib__.Import.Asttypes.variance) list -> cstrs:(Ppxlib__.Import.core_type * Ppxlib__.Import.core_type * Location.t) list -> kind:Ppxlib__.Import.type_kind -> private_:Ppxlib__.Import.Asttypes.private_flag -> manifest:Ppxlib__.Import.core_type option -> Ppxlib__.Import.type_declaration) with_loc
val unapplied_type_constr_conv : (Longident.t Loc.t -> f:(string -> string) -> Ppxlib__.Import.expression) with_loc

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.
val type_constr_conv : (Longident.t Loc.t -> f:(string -> string) -> Ppxlib__.Import.expression list -> Ppxlib__.Import.expression) with_loc
val eta_reduce : Ppxlib__.Import.expression -> Ppxlib__.Import.expression option

Tries to simplify fun v1 v2 .. -> f v1 v2 .. into f. Only works when f is a path, not an arbitrary expression as that would change the meaning of the code. This can be used either for cleaning up the generated code, or to reduce allocation if f is a local variable (the compiler won't optimize the allocation of the closure).

Eta-reduction can change the types/behavior in some corner cases that are unlikely to show up in generated code:

  • if f has optional arguments, eta-expanding f can drop them
  • because labels commute, it can change the type of an expression: $ let f ~x y = x + y let f2 = fun x -> add x;; val f : x:int -> int -> int = <fun> val f2 : int -> x:int -> int = <fun> In fact, if f does side effects before receiving all its arguments, and if the eta-expansion is partially applied, eta-reducing could change behavior.

eta_reduce_if_possible_and_nonrec is meant for the case where the resulting expression is going to be bound in a potentially recursive let-binding, where we have to keep the eta-expansion when rec_flag is Recursive to avoid a compile error.

val eta_reduce_if_possible : Ppxlib__.Import.expression -> Ppxlib__.Import.expression
val eta_reduce_if_possible_and_nonrec : Ppxlib__.Import.expression -> rec_flag:Ppxlib__.Import.rec_flag -> Ppxlib__.Import.expression