Ast_builder.DefaultHelpers taking a ~loc argument. This module is meant to be opened or aliased.
module Located : sig ... endval 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 ->
'b 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 ptyp_any : loc:Astlib.Location.t -> Astlib.Ast_500.Parsetree.core_typeval ptyp_var :
loc:Astlib.Location.t ->
string ->
Astlib.Ast_500.Parsetree.core_typeval ptyp_tuple :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.core_type list ->
Astlib.Ast_500.Parsetree.core_typeval 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_alias :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.core_type ->
string ->
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_poly :
loc:Astlib.Location.t ->
string Astlib.Location.loc list ->
Astlib.Ast_500.Parsetree.core_type ->
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_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_let :
loc:Astlib.Location.t ->
Astlib.Ast_500.Asttypes.rec_flag ->
Astlib.Ast_500.Parsetree.value_binding list ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval pexp_function :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.case list ->
Astlib.Ast_500.Parsetree.expressionval 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 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_tuple :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression 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_array :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression list ->
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_constraint :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.core_type ->
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_setinstvar :
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_newtype :
loc:Astlib.Location.t ->
string Astlib.Location.loc ->
Astlib.Ast_500.Parsetree.expression ->
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 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 include_infos :
loc:Astlib.Location.t ->
'a ->
'b Astlib.Ast_500.Parsetree.include_infosval label_declaration :
loc:Astlib.Location.t ->
name:string Astlib.Location.loc ->
mutable_:Astlib.Ast_500.Asttypes.mutable_flag ->
type_:Astlib.Ast_500.Parsetree.core_type ->
Astlib.Ast_500.Parsetree.label_declarationval 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:Stdlib.Lexing.position ->
end_:Stdlib.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 module_declaration :
loc:Astlib.Location.t ->
name:string option Astlib.Location.loc ->
type_:Astlib.Ast_500.Parsetree.module_type ->
Astlib.Ast_500.Parsetree.module_declarationval 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_constraint :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.module_expr ->
Astlib.Ast_500.Parsetree.module_type ->
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 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_signature :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.signature_item list ->
Astlib.Ast_500.Parsetree.module_typeval pmty_functor :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.functor_parameter ->
Astlib.Ast_500.Parsetree.module_type ->
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 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 ->
'b 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_tuple :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.pattern list ->
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_array :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.pattern list ->
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_constraint :
loc:Astlib.Location.t ->
Astlib.Ast_500.Parsetree.pattern ->
Astlib.Ast_500.Parsetree.core_type ->
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 ->
Stdlib.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 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 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_declaration :
loc:Astlib.Location.t ->
name:string Astlib.Location.loc ->
params:
(Astlib.Ast_500.Parsetree.core_type
* (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity))
list ->
cstrs:
(Astlib.Ast_500.Parsetree.core_type
* Astlib.Ast_500.Parsetree.core_type
* Astlib.Location.t)
list ->
kind:Astlib.Ast_500.Parsetree.type_kind ->
private_:Astlib.Ast_500.Asttypes.private_flag ->
manifest:Astlib.Ast_500.Parsetree.core_type option ->
Astlib.Ast_500.Parsetree.type_declarationval 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 value_binding :
loc:Astlib.Location.t ->
pat:Astlib.Ast_500.Parsetree.pattern ->
expr:Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.value_bindingval value_description :
loc:Astlib.Location.t ->
name:string Astlib.Location.loc ->
type_:Astlib.Ast_500.Parsetree.core_type ->
prim:string list ->
Astlib.Ast_500.Parsetree.value_descriptionmodule Latest : sig ... endThis module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.
val 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:Location.t -> int -> Astlib.Ast_500.Parsetree.expressionval echar : loc:Location.t -> char -> Astlib.Ast_500.Parsetree.expressionval estring : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.expressionval efloat : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.expressionval eint32 : loc:Location.t -> int32 -> Astlib.Ast_500.Parsetree.expressionval eint64 : loc:Location.t -> int64 -> Astlib.Ast_500.Parsetree.expressionval enativeint :
loc:Location.t ->
nativeint ->
Astlib.Ast_500.Parsetree.expressionval ebool : loc:Location.t -> bool -> Astlib.Ast_500.Parsetree.expressionval pint : loc:Location.t -> int -> Astlib.Ast_500.Parsetree.patternval pchar : loc:Location.t -> char -> Astlib.Ast_500.Parsetree.patternval pstring : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.patternval pfloat : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.patternval pint32 : loc:Location.t -> int32 -> Astlib.Ast_500.Parsetree.patternval pint64 : loc:Location.t -> int64 -> Astlib.Ast_500.Parsetree.patternval pnativeint :
loc:Location.t ->
nativeint ->
Astlib.Ast_500.Parsetree.patternval pbool : loc:Location.t -> bool -> Astlib.Ast_500.Parsetree.patternval eunit : loc:Location.t -> Astlib.Ast_500.Parsetree.expressionval punit : loc:Location.t -> Astlib.Ast_500.Parsetree.patternval evar : loc: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:Location.t -> string -> Astlib.Ast_500.Parsetree.patternval eapply :
loc: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 eabstract :
loc:Location.t ->
Astlib.Ast_500.Parsetree.pattern list ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionval esequence :
loc:Location.t ->
Astlib.Ast_500.Parsetree.expression list ->
Astlib.Ast_500.Parsetree.expressionval ppat_tuple_opt :
loc:Location.t ->
Astlib.Ast_500.Parsetree.pattern list ->
Astlib.Ast_500.Parsetree.pattern optionval pexp_tuple_opt :
loc: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_tail :
loc:Location.t ->
Astlib.Ast_500.Parsetree.expression list ->
Astlib.Ast_500.Parsetree.expression ->
Astlib.Ast_500.Parsetree.expressionelist_tail ~loc [expr1; expr2; expr3] expr_tail produces the expression expr1::expr2::expr3::expr_tail.
val elist :
loc:Location.t ->
Astlib.Ast_500.Parsetree.expression list ->
Astlib.Ast_500.Parsetree.expressionelist ~loc [expr1; expr2; expr3] produces the list litteral expression [expr1; expr2; expr3].
val plist_tail :
loc:Location.t ->
Astlib.Ast_500.Parsetree.pattern list ->
Astlib.Ast_500.Parsetree.pattern ->
Astlib.Ast_500.Parsetree.patternplist_tail ~loc [pat1; pat2; pat3] pat_tail produces the pattern pat1::pat2::pat3::pat_tail.
val plist :
loc:Location.t ->
Astlib.Ast_500.Parsetree.pattern list ->
Astlib.Ast_500.Parsetree.patternplist ~loc [pat1; pat2; pat3] produces the list pattern [pat1; pat2; pat3].
val pstr_value_list :
loc: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:Location.t ->
name:string 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
* 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:Location.t ->
Longident.t 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:Location.t ->
Longident.t 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.expression