Import.Ast_builderinclude module type of struct include Ppxlib.Ast_builder.Default endmodule Located = Ppxlib.Ast_builder.Default.Locatedval attribute :
loc:Astlib.Location.t ->
name:string Astlib.Location.loc ->
payload:Astlib.Ast_500.Parsetree.payload ->
Astlib.Ast_500.Parsetree.attributeval binding_op :
loc:Astlib.Location.t ->
op:string Astlib.Location.loc ->
pat:Astlib.Ast_500.Parsetree.pattern ->
exp:Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.binding_opval case :
lhs:Astlib.Ast_500.Parsetree.pattern ->
guard:Astlib.Ast_500.Parsetree.expression option ->
rhs:Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.caseval pcl_constr :
loc:Astlib.Location.t ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.core_type list ->
Astlib.Ast_500.Parsetree.class_exprval pcl_structure :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.class_structure ->
Astlib.Ast_500.Parsetree.class_exprval pcl_apply :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.class_expr ->
(Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression)
list ->
Astlib.Ast_500.Parsetree.class_exprval pcl_constraint :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.class_expr ->
Astlib.Ast_500.Parsetree.class_type ->
Astlib.Ast_500.Parsetree.class_exprval pcl_extension :
loc:Astlib.Location.t ->
(string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) ->
Astlib.Ast_500.Parsetree.class_exprval pcf_inherit :
loc:Astlib.Location.t ->
Astlib.Ast_500.Asttypes.override_flag ->
Astlib.Ast_500.Parsetree.class_expr ->
string Astlib.Location.loc option ->
Astlib.Ast_500.Parsetree.class_fieldval pcf_val :
loc:Astlib.Location.t ->
(string Astlib.Location.loc
* Astlib.Ast_500.Asttypes.mutable_flag
* Astlib.Ast_500.Parsetree.class_field_kind) ->
Astlib.Ast_500.Parsetree.class_fieldval pcf_method :
loc:Astlib.Location.t ->
(string Astlib.Location.loc
* Astlib.Ast_500.Asttypes.private_flag
* Astlib.Ast_500.Parsetree.class_field_kind) ->
Astlib.Ast_500.Parsetree.class_fieldval pcf_constraint :
loc:Astlib.Location.t ->
(Astlib.Ast_500.Parsetree.core_type * Astlib.Ast_500.Parsetree.core_type) ->
Astlib.Ast_500.Parsetree.class_fieldval pcf_initializer :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.class_fieldval pcf_attribute :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.attribute ->
Astlib.Ast_500.Parsetree.class_fieldval pcf_extension :
loc:Astlib.Location.t ->
(string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) ->
Astlib.Ast_500.Parsetree.class_fieldval class_infos :
loc:Astlib.Location.t ->
virt:Astlib.Ast_500.Asttypes.virtual_flag ->
params:
(Astlib.Ast_500.Parsetree.core_type
* (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity))
list ->
name:string Astlib.Location.loc ->
expr:'a ->
'a Astlib.Ast_500.Parsetree.class_infosval class_signature :
self:Astlib.Ast_500.Parsetree.core_type ->
fields:Astlib.Ast_500.Parsetree.class_type_field list ->
Astlib.Ast_500.Parsetree.class_signatureval class_structure :
self:Astlib.Ast_500.Parsetree.pattern ->
fields:Astlib.Ast_500.Parsetree.class_field list ->
Astlib.Ast_500.Parsetree.class_structureval pcty_constr :
loc:Astlib.Location.t ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.core_type list ->
Astlib.Ast_500.Parsetree.class_typeval pcty_signature :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.class_signature ->
Astlib.Ast_500.Parsetree.class_typeval pcty_extension :
loc:Astlib.Location.t ->
(string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) ->
Astlib.Ast_500.Parsetree.class_typeval pctf_inherit :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.class_type ->
Astlib.Ast_500.Parsetree.class_type_fieldval pctf_method :
loc:Astlib.Location.t ->
(string Astlib.Location.loc
* Astlib.Ast_500.Asttypes.private_flag
* Astlib.Ast_500.Asttypes.virtual_flag
* Astlib.Ast_500.Parsetree.core_type) ->
Astlib.Ast_500.Parsetree.class_type_fieldval pctf_constraint :
loc:Astlib.Location.t ->
(Astlib.Ast_500.Parsetree.core_type * Astlib.Ast_500.Parsetree.core_type) ->
Astlib.Ast_500.Parsetree.class_type_fieldval pctf_attribute :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.attribute ->
Astlib.Ast_500.Parsetree.class_type_fieldval pctf_extension :
loc:Astlib.Location.t ->
(string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) ->
Astlib.Ast_500.Parsetree.class_type_fieldval comprehension :
body:Astlib.Ast_500.Parsetree.expression ->
clauses:Astlib.Ast_500.Parsetree.comprehension_clause list ->
Astlib.Ast_500.Parsetree.comprehensionval comprehension_clause_binding :
cb_pattern:Astlib.Ast_500.Parsetree.pattern ->
cb_iterator:Astlib.Ast_500.Parsetree.comprehension_iterator ->
cb_attributes:Astlib.Ast_500.Parsetree.attribute list ->
Astlib.Ast_500.Parsetree.comprehension_clause_bindingval constructor_argument :
loc:Astlib.Location.t ->
modalities:Astlib.Ast_500.Parsetree.modality Astlib.Location.loc list ->
type_:Astlib.Ast_500.Parsetree.core_type ->
Astlib.Ast_500.Parsetree.constructor_argumentval ptyp_constr :
loc:Astlib.Location.t ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.core_type list ->
Astlib.Ast_500.Parsetree.core_typeval ptyp_object :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.object_field list ->
Astlib.Ast_500.Asttypes.closed_flag ->
Astlib.Ast_500.Parsetree.core_typeval ptyp_class :
loc:Astlib.Location.t ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.core_type list ->
Astlib.Ast_500.Parsetree.core_typeval ptyp_variant :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.row_field list ->
Astlib.Ast_500.Asttypes.closed_flag ->
string list option ->
Astlib.Ast_500.Parsetree.core_typeval ptyp_package :
loc:Astlib.Location.t ->
(Astlib.Longident.t Astlib.Location.loc
* (Astlib.Longident.t Astlib.Location.loc
* Astlib.Ast_500.Parsetree.core_type)
list) ->
Astlib.Ast_500.Parsetree.core_typeval ptyp_of_kind :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.jkind_annotation ->
Astlib.Ast_500.Parsetree.core_typeval ptyp_extension :
loc:Astlib.Location.t ->
(string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) ->
Astlib.Ast_500.Parsetree.core_typeval pdir_string :
loc:Astlib.Location.t ->
string ->
Astlib.Ast_500.Parsetree.directive_argumentval pdir_int :
loc:Astlib.Location.t ->
string ->
char option ->
Astlib.Ast_500.Parsetree.directive_argumentval pdir_ident :
loc:Astlib.Location.t ->
Astlib.Longident.t ->
Astlib.Ast_500.Parsetree.directive_argumentval pdir_bool :
loc:Astlib.Location.t ->
bool ->
Astlib.Ast_500.Parsetree.directive_argumentval pexp_ident :
loc:Astlib.Location.t ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.expressionval pexp_constant :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.constant ->
Astlib.Ast_500.Parsetree.expressionval pexp_match :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.case list ->
Astlib.Ast_500.Parsetree.expressionval pexp_try :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.case list ->
Astlib.Ast_500.Parsetree.expressionval pexp_construct :
loc:Astlib.Location.t ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.expression option ->
Astlib.Ast_500.Parsetree.expressionval pexp_variant :
loc:Astlib.Location.t ->
string ->
Astlib.Ast_500.Parsetree.expression option ->
Astlib.Ast_500.Parsetree.expressionval pexp_record :
loc:Astlib.Location.t ->
(Astlib.Longident.t Astlib.Location.loc * Astlib.Ast_500.Parsetree.expression)
list ->
Astlib.Ast_500.Parsetree.expression option ->
Astlib.Ast_500.Parsetree.expressionval pexp_field :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.expressionval pexp_setfield :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval pexp_ifthenelse :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expression option ->
Astlib.Ast_500.Parsetree.expressionval pexp_sequence :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval pexp_while :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval pexp_coerce :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.core_type option ->
Astlib.Ast_500.Parsetree.core_type ->
Astlib.Ast_500.Parsetree.expressionval pexp_send :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
string Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.expressionval pexp_new :
loc:Astlib.Location.t ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.expressionval pexp_setvar :
loc:Astlib.Location.t ->
string Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval pexp_override :
loc:Astlib.Location.t ->
(string Astlib.Location.loc * Astlib.Ast_500.Parsetree.expression) list ->
Astlib.Ast_500.Parsetree.expressionval pexp_letmodule :
loc:Astlib.Location.t ->
string option Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.module_expr ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval pexp_letexception :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.extension_constructor ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval pexp_assert :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval pexp_lazy :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval pexp_poly :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.core_type option ->
Astlib.Ast_500.Parsetree.expressionval pexp_object :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.class_structure ->
Astlib.Ast_500.Parsetree.expressionval pexp_pack :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_expr ->
Astlib.Ast_500.Parsetree.expressionval pexp_letop :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.letop ->
Astlib.Ast_500.Parsetree.expressionval pexp_extension :
loc:Astlib.Location.t ->
(string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) ->
Astlib.Ast_500.Parsetree.expressionval pexp_unreachable :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expressionval pexp_stack :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval pexp_comprehension :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.comprehension_expression ->
Astlib.Ast_500.Parsetree.expressionval pexp_overwrite :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval pexp_quote :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval pexp_splice :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval pexp_hole : loc:Astlib.Location.t -> Astlib.Ast_500.Parsetree.expressionval extension_constructor :
loc:Astlib.Location.t ->
name:string Astlib.Location.loc ->
kind:Astlib.Ast_500.Parsetree.extension_constructor_kind ->
Astlib.Ast_500.Parsetree.extension_constructorval function_constraint :
mode_annotations:Astlib.Ast_500.Parsetree.mode Astlib.Location.loc list ->
ret_mode_annotations:Astlib.Ast_500.Parsetree.mode Astlib.Location.loc list ->
ret_type_constraint:Astlib.Ast_500.Parsetree.type_constraint option ->
Astlib.Ast_500.Parsetree.function_constraintval pparam_val :
loc:Astlib.Location.t ->
Astlib.Ast_500.Asttypes.arg_label ->
Astlib.Ast_500.Parsetree.expression option ->
Astlib.Ast_500.Parsetree.pattern ->
Astlib.Ast_500.Parsetree.function_paramval pparam_newtype :
loc:Astlib.Location.t ->
string Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.jkind_annotation option ->
Astlib.Ast_500.Parsetree.function_paramval pjk_default :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.jkind_annotationval pjk_abbreviation :
loc:Astlib.Location.t ->
string ->
Astlib.Ast_500.Parsetree.jkind_annotationval pjk_kind_of :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.core_type ->
Astlib.Ast_500.Parsetree.jkind_annotationval pjk_product :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.jkind_annotation list ->
Astlib.Ast_500.Parsetree.jkind_annotationval letop :
let_:Astlib.Ast_500.Parsetree.binding_op ->
ands:Astlib.Ast_500.Parsetree.binding_op list ->
body:Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.letopval location :
start:Lexing.position ->
end_:Lexing.position ->
ghost:bool ->
Astlib.Location.tval module_binding :
loc:Astlib.Location.t ->
name:string option Astlib.Location.loc ->
expr:Astlib.Ast_500.Parsetree.module_expr ->
Astlib.Ast_500.Parsetree.module_bindingval pmod_ident :
loc:Astlib.Location.t ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.module_exprval pmod_structure :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.structure_item list ->
Astlib.Ast_500.Parsetree.module_exprval pmod_functor :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.functor_parameter ->
Astlib.Ast_500.Parsetree.module_expr ->
Astlib.Ast_500.Parsetree.module_exprval pmod_apply :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_expr ->
Astlib.Ast_500.Parsetree.module_expr ->
Astlib.Ast_500.Parsetree.module_exprval pmod_unpack :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.module_exprval pmod_extension :
loc:Astlib.Location.t ->
(string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) ->
Astlib.Ast_500.Parsetree.module_exprval pmod_instance :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_instance ->
Astlib.Ast_500.Parsetree.module_exprval module_instance :
instance_head:string ->
instance_args:(string * Astlib.Ast_500.Parsetree.module_instance) list ->
Astlib.Ast_500.Parsetree.module_instanceval module_substitution :
loc:Astlib.Location.t ->
name:string Astlib.Location.loc ->
manifest:Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.module_substitutionval pmty_ident :
loc:Astlib.Location.t ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.module_typeval pmty_with :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_type ->
Astlib.Ast_500.Parsetree.with_constraint list ->
Astlib.Ast_500.Parsetree.module_typeval pmty_typeof :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_expr ->
Astlib.Ast_500.Parsetree.module_typeval pmty_extension :
loc:Astlib.Location.t ->
(string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) ->
Astlib.Ast_500.Parsetree.module_typeval pmty_alias :
loc:Astlib.Location.t ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.module_typeval pmty_strengthen :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_type ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.module_typeval module_type_declaration :
loc:Astlib.Location.t ->
name:string Astlib.Location.loc ->
type_:Astlib.Ast_500.Parsetree.module_type option ->
Astlib.Ast_500.Parsetree.module_type_declarationval otag :
loc:Astlib.Location.t ->
string Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.core_type ->
Astlib.Ast_500.Parsetree.object_fieldval oinherit :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.core_type ->
Astlib.Ast_500.Parsetree.object_fieldval open_infos :
loc:Astlib.Location.t ->
expr:'a ->
override:Astlib.Ast_500.Asttypes.override_flag ->
'a Astlib.Ast_500.Parsetree.open_infosval ppat_any : loc:Astlib.Location.t -> Astlib.Ast_500.Parsetree.patternval ppat_var :
loc:Astlib.Location.t ->
string Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.patternval ppat_alias :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.pattern ->
string Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.patternval ppat_constant :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.constant ->
Astlib.Ast_500.Parsetree.patternval ppat_interval :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.constant ->
Astlib.Ast_500.Parsetree.constant ->
Astlib.Ast_500.Parsetree.patternval ppat_variant :
loc:Astlib.Location.t ->
string ->
Astlib.Ast_500.Parsetree.pattern option ->
Astlib.Ast_500.Parsetree.patternval ppat_record :
loc:Astlib.Location.t ->
(Astlib.Longident.t Astlib.Location.loc * Astlib.Ast_500.Parsetree.pattern)
list ->
Astlib.Ast_500.Asttypes.closed_flag ->
Astlib.Ast_500.Parsetree.patternval ppat_or :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.pattern ->
Astlib.Ast_500.Parsetree.pattern ->
Astlib.Ast_500.Parsetree.patternval ppat_type :
loc:Astlib.Location.t ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.patternval ppat_lazy :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.pattern ->
Astlib.Ast_500.Parsetree.patternval ppat_unpack :
loc:Astlib.Location.t ->
string option Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.patternval ppat_exception :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.pattern ->
Astlib.Ast_500.Parsetree.patternval ppat_extension :
loc:Astlib.Location.t ->
(string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) ->
Astlib.Ast_500.Parsetree.patternval ppat_open :
loc:Astlib.Location.t ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.pattern ->
Astlib.Ast_500.Parsetree.patternval position :
fname:string ->
lnum:int ->
bol:int ->
cnum:int ->
Lexing.positionval rtag :
loc:Astlib.Location.t ->
string Astlib.Location.loc ->
bool ->
Astlib.Ast_500.Parsetree.core_type list ->
Astlib.Ast_500.Parsetree.row_fieldval rinherit :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.core_type ->
Astlib.Ast_500.Parsetree.row_fieldval psig_value :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.value_description ->
Astlib.Ast_500.Parsetree.signature_itemval psig_type :
loc:Astlib.Location.t ->
Astlib.Ast_500.Asttypes.rec_flag ->
Astlib.Ast_500.Parsetree.type_declaration list ->
Astlib.Ast_500.Parsetree.signature_itemval psig_typesubst :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.type_declaration list ->
Astlib.Ast_500.Parsetree.signature_itemval psig_typext :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.type_extension ->
Astlib.Ast_500.Parsetree.signature_itemval psig_exception :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.type_exception ->
Astlib.Ast_500.Parsetree.signature_itemval psig_module :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_declaration ->
Astlib.Ast_500.Parsetree.signature_itemval psig_modsubst :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_substitution ->
Astlib.Ast_500.Parsetree.signature_itemval psig_recmodule :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_declaration list ->
Astlib.Ast_500.Parsetree.signature_itemval psig_modtype :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_type_declaration ->
Astlib.Ast_500.Parsetree.signature_itemval psig_modtypesubst :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_type_declaration ->
Astlib.Ast_500.Parsetree.signature_itemval psig_class :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos list ->
Astlib.Ast_500.Parsetree.signature_itemval psig_class_type :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos list ->
Astlib.Ast_500.Parsetree.signature_itemval psig_attribute :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.attribute ->
Astlib.Ast_500.Parsetree.signature_itemval psig_extension :
loc:Astlib.Location.t ->
(string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) ->
Astlib.Ast_500.Parsetree.attribute list ->
Astlib.Ast_500.Parsetree.signature_itemval psig_kind_abbrev :
loc:Astlib.Location.t ->
string Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.jkind_annotation ->
Astlib.Ast_500.Parsetree.signature_itemval pstr_eval :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.attribute list ->
Astlib.Ast_500.Parsetree.structure_itemval pstr_value :
loc:Astlib.Location.t ->
Astlib.Ast_500.Asttypes.rec_flag ->
Astlib.Ast_500.Parsetree.value_binding list ->
Astlib.Ast_500.Parsetree.structure_itemval pstr_primitive :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.value_description ->
Astlib.Ast_500.Parsetree.structure_itemval pstr_type :
loc:Astlib.Location.t ->
Astlib.Ast_500.Asttypes.rec_flag ->
Astlib.Ast_500.Parsetree.type_declaration list ->
Astlib.Ast_500.Parsetree.structure_itemval pstr_typext :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.type_extension ->
Astlib.Ast_500.Parsetree.structure_itemval pstr_exception :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.type_exception ->
Astlib.Ast_500.Parsetree.structure_itemval pstr_module :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_binding ->
Astlib.Ast_500.Parsetree.structure_itemval pstr_recmodule :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_binding list ->
Astlib.Ast_500.Parsetree.structure_itemval pstr_modtype :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_type_declaration ->
Astlib.Ast_500.Parsetree.structure_itemval pstr_class :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.class_expr Astlib.Ast_500.Parsetree.class_infos list ->
Astlib.Ast_500.Parsetree.structure_itemval pstr_class_type :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos list ->
Astlib.Ast_500.Parsetree.structure_itemval pstr_attribute :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.attribute ->
Astlib.Ast_500.Parsetree.structure_itemval pstr_extension :
loc:Astlib.Location.t ->
(string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) ->
Astlib.Ast_500.Parsetree.attribute list ->
Astlib.Ast_500.Parsetree.structure_itemval pstr_kind_abbrev :
loc:Astlib.Location.t ->
string Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.jkind_annotation ->
Astlib.Ast_500.Parsetree.structure_itemval toplevel_directive :
loc:Astlib.Location.t ->
name:string Astlib.Location.loc ->
arg:Astlib.Ast_500.Parsetree.directive_argument option ->
Astlib.Ast_500.Parsetree.toplevel_directiveval type_exception :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.extension_constructor ->
Astlib.Ast_500.Parsetree.type_exceptionval type_extension :
loc:Astlib.Location.t ->
path:Astlib.Longident.t Astlib.Location.loc ->
params:
(Astlib.Ast_500.Parsetree.core_type
* (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity))
list ->
constructors:Astlib.Ast_500.Parsetree.extension_constructor list ->
private_:Astlib.Ast_500.Asttypes.private_flag ->
Astlib.Ast_500.Parsetree.type_extensionval pexp_apply :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
(Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression)
list ->
Astlib.Ast_500.Parsetree.expressionval ppat_construct :
loc:Astlib.Location.t ->
Astlib.Longident.t Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.pattern option ->
Astlib.Ast_500.Parsetree.patternval constructor_declaration :
loc:Astlib.Location.t ->
name:string Astlib.Location.loc ->
args:Astlib.Ast_500.Parsetree.constructor_arguments ->
res:Astlib.Ast_500.Parsetree.core_type option ->
Astlib.Ast_500.Parsetree.constructor_declarationval eint : loc:Ppxlib.Location.t -> int -> Astlib.Ast_500.Parsetree.expressionval echar :
loc:Ppxlib.Location.t ->
char ->
Astlib.Ast_500.Parsetree.expressionval estring :
loc:Ppxlib.Location.t ->
string ->
Astlib.Ast_500.Parsetree.expressionval efloat :
loc:Ppxlib.Location.t ->
string ->
Astlib.Ast_500.Parsetree.expressionval eint32 :
loc:Ppxlib.Location.t ->
int32 ->
Astlib.Ast_500.Parsetree.expressionval eint64 :
loc:Ppxlib.Location.t ->
int64 ->
Astlib.Ast_500.Parsetree.expressionval enativeint :
loc:Ppxlib.Location.t ->
nativeint ->
Astlib.Ast_500.Parsetree.expressionval ebool :
loc:Ppxlib.Location.t ->
bool ->
Astlib.Ast_500.Parsetree.expressionval pint : loc:Ppxlib.Location.t -> int -> Astlib.Ast_500.Parsetree.patternval pchar : loc:Ppxlib.Location.t -> char -> Astlib.Ast_500.Parsetree.patternval pstring :
loc:Ppxlib.Location.t ->
string ->
Astlib.Ast_500.Parsetree.patternval pfloat :
loc:Ppxlib.Location.t ->
string ->
Astlib.Ast_500.Parsetree.patternval pint32 : loc:Ppxlib.Location.t -> int32 -> Astlib.Ast_500.Parsetree.patternval pint64 : loc:Ppxlib.Location.t -> int64 -> Astlib.Ast_500.Parsetree.patternval pnativeint :
loc:Ppxlib.Location.t ->
nativeint ->
Astlib.Ast_500.Parsetree.patternval pbool : loc:Ppxlib.Location.t -> bool -> Astlib.Ast_500.Parsetree.patternval eunit : loc:Ppxlib.Location.t -> Astlib.Ast_500.Parsetree.expressionval punit : loc:Ppxlib.Location.t -> Astlib.Ast_500.Parsetree.patternval evar :
loc:Ppxlib.Location.t ->
string ->
Astlib.Ast_500.Parsetree.expressionevar 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 : loc:Ppxlib.Location.t -> string -> Astlib.Ast_500.Parsetree.patternval eapply :
loc:Ppxlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expression list ->
Astlib.Ast_500.Parsetree.expressionSame as pexp_apply but without labels
val esequence :
loc:Ppxlib.Location.t ->
Astlib.Ast_500.Parsetree.expression list ->
Astlib.Ast_500.Parsetree.expressionval ppat_tuple_opt :
loc:Ppxlib.Location.t ->
Astlib.Ast_500.Parsetree.pattern list ->
Astlib.Ast_500.Parsetree.pattern optionval pexp_tuple_opt :
loc:Ppxlib.Location.t ->
Astlib.Ast_500.Parsetree.expression list ->
Astlib.Ast_500.Parsetree.expression optionval pconstruct :
Astlib.Ast_500.Parsetree.constructor_declaration ->
Astlib.Ast_500.Parsetree.pattern option ->
Astlib.Ast_500.Parsetree.patternval econstruct :
Astlib.Ast_500.Parsetree.constructor_declaration ->
Astlib.Ast_500.Parsetree.expression option ->
Astlib.Ast_500.Parsetree.expressionval elist :
loc:Ppxlib.Location.t ->
Astlib.Ast_500.Parsetree.expression list ->
Astlib.Ast_500.Parsetree.expressionval plist :
loc:Ppxlib.Location.t ->
Astlib.Ast_500.Parsetree.pattern list ->
Astlib.Ast_500.Parsetree.patternval pexp_function :
loc:Ppxlib.Location.t ->
Astlib.Ast_500.Parsetree.case list ->
Astlib.Ast_500.Parsetree.expressionval pstr_value_list :
loc:Ppxlib.Location.t ->
Ppxlib_ast.Asttypes.rec_flag ->
Astlib.Ast_500.Parsetree.value_binding list ->
Astlib.Ast_500.Parsetree.structure_item listpstr_value_list ~loc rf vbs = pstr_value ~loc rf vbs if vbs <> [], [] otherwise.
val nonrec_type_declaration :
loc:Ppxlib.Location.t ->
name:string Ppxlib.Loc.t ->
params:
(Astlib.Ast_500.Parsetree.core_type * Ppxlib_ast.Asttypes.variance) list ->
cstrs:
(Astlib.Ast_500.Parsetree.core_type
* Astlib.Ast_500.Parsetree.core_type
* Ppxlib.Location.t)
list ->
kind:Astlib.Ast_500.Parsetree.type_kind ->
private_:Ppxlib_ast.Asttypes.private_flag ->
manifest:Astlib.Ast_500.Parsetree.core_type option ->
Astlib.Ast_500.Parsetree.type_declarationval unapplied_type_constr_conv :
loc:Ppxlib.Location.t ->
Ppxlib.Longident.t Ppxlib.Loc.t ->
f:(string -> string) ->
Astlib.Ast_500.Parsetree.expressionunapplied_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:
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 :
loc:Ppxlib.Location.t ->
Ppxlib.Longident.t Ppxlib.Loc.t ->
f:(string -> string) ->
Astlib.Ast_500.Parsetree.expression list ->
Astlib.Ast_500.Parsetree.expressionval eta_reduce :
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expression optionTries 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:
f has optional arguments, eta-expanding f can drop themf 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 :
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval eta_reduce_if_possible_and_nonrec :
Astlib.Ast_500.Parsetree.expression ->
rec_flag:Astlib.Ast_500.Asttypes.rec_flag ->
Astlib.Ast_500.Parsetree.expressionval ptyp_any : loc:Ppxlib.Location.t -> Astlib.Ast_500.Parsetree.core_typeval ptyp_var :
loc:Ppxlib.Location.t ->
string ->
Astlib.Ast_500.Parsetree.core_typeinclude module type of struct include Ppxlib_jane.Ast_builder.Default endtype index_kind = Ppxlib_jane.Shim.index_kindval ptyp_arrow :
loc:Astlib.Location.t ->
Ppxlib_jane.Shim.arrow_argument ->
Ppxlib_jane.Shim.arrow_result ->
Ppxlib_ast.Parsetree.core_typeConstruct a Ptyp_arrow
val tarrow :
loc:Astlib.Location.t ->
Ppxlib_jane.Shim.arrow_argument list ->
Ppxlib_jane.Shim.arrow_result ->
Ppxlib_ast.Parsetree.core_typeConstruct a multi-argument arrow type with the provided arguments and result.
val tarrow_maybe :
loc:Astlib.Location.t ->
Ppxlib_jane.Shim.arrow_argument list ->
Ppxlib_ast.Parsetree.core_type ->
Ppxlib_ast.Parsetree.core_typeAs tarrow, but will return the result if the input list is empty rather than erroring; this means the result type cannot have a mode annotation.
val pexp_let :
loc:Astlib.Location.t ->
Ppxlib_ast.Asttypes.mutable_flag ->
Ppxlib_ast.Asttypes.rec_flag ->
Ppxlib_ast.Parsetree.value_binding list ->
Ppxlib_ast.Parsetree.expression ->
Ppxlib_ast.Parsetree.expressionPexp_let with let mutable support
val pexp_constraint :
loc:Astlib.Location.t ->
Ppxlib_ast.Parsetree.expression ->
Ppxlib_ast.Parsetree.core_type option ->
Ppxlib_jane.Shim.Modes.t ->
Ppxlib_ast.Parsetree.expressionConstruct a Pexp_constraint with modes
val ppat_constraint :
loc:Astlib.Location.t ->
Ppxlib_ast.Parsetree.pattern ->
Ppxlib_ast.Parsetree.core_type option ->
Ppxlib_jane.Shim.Modes.t ->
Ppxlib_ast.Parsetree.patternConstruct a Ppat_constraint with modes
val value_binding :
loc:Astlib.Location.t ->
pat:Ppxlib_ast.Parsetree.pattern ->
expr:Ppxlib_ast.Parsetree.expression ->
modes:Ppxlib_jane.Shim.Modes.t ->
Ppxlib_ast.Parsetree.value_bindingContruct a value_binding with modes
val pcstr_tuple :
loc:Astlib.Location.t ->
(Ppxlib_jane.Shim.Modalities.t * Ppxlib_ast.Parsetree.core_type) list ->
Ppxlib_ast.Parsetree.constructor_argumentsConstruct a Pcstr_tuple, a representation for the contents of a tupled variant constructor, that attaches the provided modalities to each field.
val psig_include :
loc:Astlib.Location.t ->
modalities:Ppxlib_jane.Shim.Modalities.t ->
Ppxlib_ast.Parsetree.include_description ->
Ppxlib_ast.Parsetree.signature_itemConstruct a Psig_include with modalities
val signature :
loc:Astlib.Location.t ->
?modalities:Ppxlib_jane.Shim.Modalities.t ->
Ppxlib_ast.Parsetree.signature_item list ->
Ppxlib_ast.Parsetree.signatureConstruct a signature
val pmty_signature :
loc:Astlib.Location.t ->
Ppxlib_ast.Parsetree.signature ->
Ppxlib_ast.Parsetree.module_typeval get_tuple_field_modalities :
Ppxlib_jane.Shim.Pcstr_tuple_arg.t ->
Ppxlib_jane.Shim.Modalities.t * Ppxlib_ast.Parsetree.core_typeSplits a possibly-modality-annotated field of a tupled variant constructor into a pair of its modality and the unannotated field. If the resulting mode is None, then the field is returned unchanged.
val get_label_declaration_modalities :
Ppxlib_ast.Parsetree.label_declaration ->
Ppxlib_jane.Shim.Modalities.t * Ppxlib_ast.Parsetree.label_declarationSplits a possibly-modality-annotated label declaration into a pair of its modality and the unannotated label declaration. If the resulting modality is None, then the label declaration is returned unchanged.
val label_declaration :
loc:Astlib.Location.t ->
name:string Astlib.Location.loc ->
mutable_:Ppxlib_ast.Asttypes.mutable_flag ->
modalities:Ppxlib_jane.Shim.Modalities.t ->
type_:Ppxlib_ast.Parsetree.core_type ->
Ppxlib_ast.Parsetree.label_declarationval get_value_description_modalities :
Ppxlib_ast.Parsetree.value_description ->
Ppxlib_jane.Shim.Modalities.t * Ppxlib_ast.Parsetree.value_descriptionval value_description :
loc:Astlib.Location.t ->
name:string Astlib.Location.loc ->
type_:Ppxlib_ast.Parsetree.core_type ->
modalities:Ppxlib_jane.Shim.Modalities.t ->
prim:string list ->
Ppxlib_ast.Parsetree.value_descriptionval pcstr_tuple_arg :
loc:Astlib.Location.t ->
modalities:Ppxlib_jane.Shim.Modalities.t ->
type_:Ppxlib_ast.Parsetree.core_type ->
Ppxlib_jane.Shim.Pcstr_tuple_arg.tval include_infos :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
kind:Ppxlib_jane.Shim.Include_kind.t ->
'a ->
'a Ppxlib_ast.Parsetree.include_infosval module_declaration :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
?modalities:Ppxlib_jane.Shim.Modalities.t ->
string option Astlib.Location.loc ->
Ppxlib_ast.Parsetree.module_type ->
Ppxlib_ast.Parsetree.module_declarationval pmty_functor :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
?modes:Ppxlib_jane.Shim.Modes.t ->
Ppxlib_ast.Parsetree.functor_parameter ->
Ppxlib_ast.Parsetree.module_type ->
Ppxlib_ast.Parsetree.module_typeval pmod_constraint :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
Ppxlib_ast.Parsetree.module_expr ->
Ppxlib_ast.Parsetree.module_type option ->
Ppxlib_jane.Shim.Modes.t ->
Ppxlib_ast.Parsetree.module_exprMany comments below make reference to the Jane Street compiler's treatment of function arity. These comments refer to a parsetree change made to upstream OCaml in https://github.com/ocaml/ocaml/pull/12236, but that Jane Street has mirrored internally already.
The treatment of arity can be summarized as follows:
fun x1 ... xn -> body construct, with some special allowances for function cases.Why is arity important? In native code, application sites of a function to n syntactic arguments will trigger a fast path (where arguments are passed in registers) only if the function's runtime arity is n.
As a result, ppxes must take more care than before to generate functions of the correct arity. Now, a nested function like fun x -> fun y -> e has arity 1 (returning still another function of arity 1) instead of arity 2. All bindings below that construct functions are documented as to the arity of the returned function.
Some examples of arity:
fun x y -> efun x -> fun y -> efun x y -> function P1 -> e1 | P2 -> e2fun x y -> (function P1 -> e1 | P2 -> e2)fun x -> function P1 -> function P2 -> eNotably, unparenthesized function has a special meaning when used as a direct body of fun: the function becomes part of the arity of the outer fun. The same does not apply for multiple nested functions, even if they each have a single case; the nested functions are treated as unary. (See the last example.)
type function_param = Ppxlib_jane.Shim.Pexp_function.function_paramtype function_constraint = Ppxlib_jane.Shim.Pexp_function.Function_constraint.ttype function_body = Ppxlib_jane.Shim.Pexp_function.function_bodymodule Latest = Ppxlib_jane.Ast_builder.Default.Latestval eabstract :
loc:Astlib.Location.t ->
?coalesce_fun_arity:bool ->
?return_constraint:Ppxlib_ast.Parsetree.core_type ->
Ppxlib_ast.Parsetree.pattern list ->
Ppxlib_ast.Parsetree.expression ->
Ppxlib_ast.Parsetree.expressionCreate a function with unlabeled parameters and an expression body. Like Ppxlib.Ast_builder.eapply, but for constructing functions.
coalesce_fun_arity is relevant for the Jane Street compiler. By default, coalesce_fun_arity is true.
Suppose there is a call eabstract pats body ~coalesce_fun_arity
colaesce_fun_arity is true, the arity of the returned function is the same as the arity of: add_fun_params (List.map params ~f:(Fun.param Nolabel)) bodycoalesce_fun_arity is false, then the arity of the returned function is the length of pats.In other words, coalesce_fun_arity = true allows you to build up the arity of an already-constructed function rather than necessarily creating a new function.
val unary_function :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
Ppxlib_ast.Parsetree.case list ->
Ppxlib_ast.Parsetree.expressionunary_function cases is function <cases>. When used with the Jane Street compiler, the function's runtime arity is 1, so the fast path for function application happens only when application sites of the resulting function receive 1 argument. To create a function with multiple argument that pattern-matches on the last one, use add_param or add_params to add more parameters. Alternatively, use pexp_function to provide all parameters at once.
The attributes of the resulting expression will be the attrs argument together with any attributes added by the Jane Street compiler.
val fun_param :
loc:Astlib.Location.t ->
Ppxlib_ast.Asttypes.arg_label ->
Ppxlib_ast.Parsetree.pattern ->
function_paramfun_param lbl pat is Pparam_val (lbl, None, pat). This gives a more self-documenting way of constructing the usual case: value parameters without optional argument defaults.
val add_fun_param :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
?return_constraint:Ppxlib_ast.Parsetree.core_type ->
Ppxlib_ast.Asttypes.arg_label ->
Ppxlib_ast.Parsetree.expression option ->
Ppxlib_ast.Parsetree.pattern ->
Ppxlib_ast.Parsetree.expression ->
Ppxlib_ast.Parsetree.expressionSay an expression is a "function" if it is a Pexp_fun or a Pexp_function. All functions have parameters and arity.
Suppose add_param lbl def pat e ==> e'. Then, letting param = Pparam_val (lbl, def, pat),
e is a function with arity n, then e' is a function with arity n+1. param is added at the outermost layer. For example, if e = fun <params> -> <body>, then e' = fun <param :: params> -> body. The attributes on the resulting expression will be the attrs argument together with any attributes already present on e.e is not a function, then e' is a function with arity 1, namely: fun <param> -> <e>. The attributes of the resulting expression will be the attrs argument together with any attributes added by the Jane Street compiler.val add_fun_params :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
?return_constraint:Ppxlib_ast.Parsetree.core_type ->
function_param list ->
Ppxlib_ast.Parsetree.expression ->
Ppxlib_ast.Parsetree.expressionadd_params params e is List.fold_right params ~init:e ~f:add_param. Note the fold_right: if e is fun <params'> -> <body>, then add_params params e is fun <params @ params'> -> <body>.
val coalesce_fun_arity :
Ppxlib_ast.Parsetree.expression ->
Ppxlib_ast.Parsetree.expressionThis operation is a no-op, except as interpreted by the Jane Street compiler. If e is a function with arity n with an expression body that itself is a function with arity m, then coalesce_fun_arity e is a function of arity n + m.
You should usually call coalesce_fun_arity on metaquot fun expressions whose body may be a function, e.g.:
coalesce_fun_arity [%expr fun x y -> [%e possibly_function]]
val ptyp_unboxed_tuple :
loc:Astlib.Location.t ->
(string option * Ppxlib_ast.Parsetree.core_type) list ->
Ppxlib_ast.Parsetree.core_typeval pexp_unboxed_tuple :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
(string option * Ppxlib_ast.Parsetree.expression) list ->
Ppxlib_ast.Parsetree.expressionval pexp_record_unboxed_product :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
(Astlib.Longident.t Ppxlib_ast.Asttypes.loc * Ppxlib_ast.Parsetree.expression)
list ->
Ppxlib_ast.Parsetree.expression option ->
Ppxlib_ast.Parsetree.expressionval ppat_record_unboxed_product :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
(Astlib.Longident.t Ppxlib_ast.Asttypes.loc * Ppxlib_ast.Parsetree.pattern)
list ->
Ppxlib_ast.Asttypes.closed_flag ->
Ppxlib_ast.Parsetree.patternval pexp_unboxed_field :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
Ppxlib_ast.Parsetree.expression ->
Astlib.Longident.t Ppxlib_ast.Asttypes.loc ->
Ppxlib_ast.Parsetree.expressionval ppat_unboxed_tuple :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
(string option * Ppxlib_ast.Parsetree.pattern) list ->
Ppxlib_ast.Asttypes.closed_flag ->
Ppxlib_ast.Parsetree.patternval pexp_idx :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
Ppxlib_jane.Shim.block_access ->
Ppxlib_jane.Shim.unboxed_access list ->
Ppxlib_ast.Parsetree.expressionval eint64_u :
loc:Astlib.Location.t ->
int64 ->
Ppxlib_ast.Parsetree.expressione.g. #42L
val eint32_u :
loc:Astlib.Location.t ->
int32 ->
Ppxlib_ast.Parsetree.expressione.g. #42l
val enativeint_u :
loc:Astlib.Location.t ->
nativeint ->
Ppxlib_ast.Parsetree.expressione.g. #42n
val efloat_u :
loc:Astlib.Location.t ->
string ->
Ppxlib_ast.Parsetree.expressione.g. #42.
val pint64_u : loc:Astlib.Location.t -> int64 -> Ppxlib_ast.Parsetree.patterne.g. #42L
val pint32_u : loc:Astlib.Location.t -> int32 -> Ppxlib_ast.Parsetree.patterne.g. #42l
val pnativeint_u :
loc:Astlib.Location.t ->
nativeint ->
Ppxlib_ast.Parsetree.patterne.g. #42n
val pfloat_u : loc:Astlib.Location.t -> string -> Ppxlib_ast.Parsetree.patterne.g. #42.
val ptyp_alias :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
Ppxlib_ast.Parsetree.core_type ->
Ppxlib_ast.Asttypes.label Ppxlib_ast.Asttypes.loc option ->
Ppxlib_jane.Shim.jkind_annotation option ->
Ppxlib_ast.Parsetree.core_typeval ptyp_poly :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
(string Ppxlib_ast.Asttypes.loc * Ppxlib_jane.Shim.jkind_annotation option)
list ->
Ppxlib_ast.Parsetree.core_type ->
Ppxlib_ast.Parsetree.core_typeval ptyp_quote :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
Ppxlib_ast.Parsetree.core_type ->
Ppxlib_ast.Parsetree.core_typeval ptyp_splice :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
Ppxlib_ast.Parsetree.core_type ->
Ppxlib_ast.Parsetree.core_typeval pexp_newtype :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
string Ppxlib_ast.Asttypes.loc ->
Ppxlib_jane.Shim.jkind_annotation option ->
Ppxlib_ast.Parsetree.expression ->
Ppxlib_ast.Parsetree.expressionval type_declaration :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
?jkind_annotation:Ppxlib_jane.Shim.jkind_annotation ->
name:string Astlib.Location.loc ->
params:
(Ppxlib_ast.Parsetree.core_type
* (Ppxlib_ast.Asttypes.variance * Ppxlib_ast.Asttypes.injectivity))
list ->
cstrs:
(Ppxlib_ast.Parsetree.core_type
* Ppxlib_ast.Parsetree.core_type
* Astlib.Location.t)
list ->
kind:Ppxlib_ast.Parsetree.type_kind ->
private_:Ppxlib_ast.Asttypes.private_flag ->
manifest:Ppxlib_ast.Parsetree.core_type option ->
unit ->
Ppxlib_ast.Parsetree.type_declarationval ptyp_tuple :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
(string option * Ppxlib_ast.Parsetree.core_type) list ->
Ppxlib_ast.Parsetree.core_typeval pexp_tuple :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
(string option * Ppxlib_ast.Parsetree.expression) list ->
Ppxlib_ast.Parsetree.expressionval ppat_tuple :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
(string option * Ppxlib_ast.Parsetree.pattern) list ->
Ppxlib_ast.Asttypes.closed_flag ->
Ppxlib_ast.Parsetree.patternval ppat_array :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
Ppxlib_ast.Asttypes.mutable_flag ->
Ppxlib_ast.Parsetree.pattern list ->
Ppxlib_ast.Parsetree.patternval pexp_array :
loc:Astlib.Location.t ->
?attrs:Ppxlib_ast.Parsetree.attributes ->
Ppxlib_ast.Asttypes.mutable_flag ->
Ppxlib_ast.Parsetree.expression list ->
Ppxlib_ast.Parsetree.expression