Ast_builder.Default
Helpers taking a ~loc
argument. This module is meant to be opened or aliased.
module Located : sig ... end
val attribute : loc:Warnings.loc -> name:string Location.loc -> payload:Migrate_parsetree.Ast_412.Parsetree.payload -> Migrate_parsetree.Ast_412.Parsetree.attribute
val binding_op : loc:Warnings.loc -> op:string Location.loc -> pat:Migrate_parsetree.Ast_412.Parsetree.pattern -> exp:Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.binding_op
val case : lhs:Migrate_parsetree.Ast_412.Parsetree.pattern -> guard:Migrate_parsetree.Ast_412.Parsetree.expression option -> rhs:Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.case
val pcl_constr : loc:Warnings.loc -> Ocaml_common.Longident.t Location.loc -> Migrate_parsetree.Ast_412.Parsetree.core_type list -> Migrate_parsetree.Ast_412.Parsetree.class_expr
val pcl_structure : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.class_structure -> Migrate_parsetree.Ast_412.Parsetree.class_expr
val pcl_extension : loc:Warnings.loc -> (string Location.loc * Migrate_parsetree.Ast_412.Parsetree.payload) -> Migrate_parsetree.Ast_412.Parsetree.class_expr
val pcf_inherit : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Asttypes.override_flag -> Migrate_parsetree.Ast_412.Parsetree.class_expr -> string Location.loc option -> Migrate_parsetree.Ast_412.Parsetree.class_field
val pcf_method : loc:Warnings.loc -> (string Location.loc * Migrate_parsetree.Ast_412.Asttypes.private_flag * Migrate_parsetree.Ast_412.Parsetree.class_field_kind) -> Migrate_parsetree.Ast_412.Parsetree.class_field
val pcf_constraint : loc:Warnings.loc -> (Migrate_parsetree.Ast_412.Parsetree.core_type * Migrate_parsetree.Ast_412.Parsetree.core_type) -> Migrate_parsetree.Ast_412.Parsetree.class_field
val pcf_initializer : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.class_field
val pcf_attribute : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.attribute -> Migrate_parsetree.Ast_412.Parsetree.class_field
val pcf_extension : loc:Warnings.loc -> (string Location.loc * Migrate_parsetree.Ast_412.Parsetree.payload) -> Migrate_parsetree.Ast_412.Parsetree.class_field
val class_infos : loc:Warnings.loc -> virt:Migrate_parsetree.Ast_412.Asttypes.virtual_flag -> params:(Migrate_parsetree.Ast_412.Parsetree.core_type * (Migrate_parsetree.Ast_412.Asttypes.variance * Migrate_parsetree.Ast_412.Asttypes.injectivity)) list -> name:string Location.loc -> expr:'a ->
'a Migrate_parsetree.Ast_412.Parsetree.class_infos
val class_signature : self:Migrate_parsetree.Ast_412.Parsetree.core_type -> fields:Migrate_parsetree.Ast_412.Parsetree.class_type_field list -> Migrate_parsetree.Ast_412.Parsetree.class_signature
val class_structure : self:Migrate_parsetree.Ast_412.Parsetree.pattern -> fields:Migrate_parsetree.Ast_412.Parsetree.class_field list -> Migrate_parsetree.Ast_412.Parsetree.class_structure
val pcty_constr : loc:Warnings.loc -> Ocaml_common.Longident.t Location.loc -> Migrate_parsetree.Ast_412.Parsetree.core_type list -> Migrate_parsetree.Ast_412.Parsetree.class_type
val pcty_signature : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.class_signature -> Migrate_parsetree.Ast_412.Parsetree.class_type
val pcty_extension : loc:Warnings.loc -> (string Location.loc * Migrate_parsetree.Ast_412.Parsetree.payload) -> Migrate_parsetree.Ast_412.Parsetree.class_type
val pctf_inherit : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.class_type -> Migrate_parsetree.Ast_412.Parsetree.class_type_field
val pctf_constraint : loc:Warnings.loc -> (Migrate_parsetree.Ast_412.Parsetree.core_type * Migrate_parsetree.Ast_412.Parsetree.core_type) -> Migrate_parsetree.Ast_412.Parsetree.class_type_field
val pctf_attribute : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.attribute -> Migrate_parsetree.Ast_412.Parsetree.class_type_field
val pctf_extension : loc:Warnings.loc -> (string Location.loc * Migrate_parsetree.Ast_412.Parsetree.payload) -> Migrate_parsetree.Ast_412.Parsetree.class_type_field
val constructor_declaration : loc:Warnings.loc -> name:string Location.loc -> args:Migrate_parsetree.Ast_412.Parsetree.constructor_arguments -> res:Migrate_parsetree.Ast_412.Parsetree.core_type option -> Migrate_parsetree.Ast_412.Parsetree.constructor_declaration
val ptyp_any : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.core_type
val ptyp_var : loc:Warnings.loc -> string -> Migrate_parsetree.Ast_412.Parsetree.core_type
val ptyp_tuple : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.core_type list -> Migrate_parsetree.Ast_412.Parsetree.core_type
val ptyp_constr : loc:Warnings.loc -> Ocaml_common.Longident.t Location.loc -> Migrate_parsetree.Ast_412.Parsetree.core_type list -> Migrate_parsetree.Ast_412.Parsetree.core_type
val ptyp_object : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.object_field list -> Migrate_parsetree.Ast_412.Asttypes.closed_flag -> Migrate_parsetree.Ast_412.Parsetree.core_type
val ptyp_class : loc:Warnings.loc -> Ocaml_common.Longident.t Location.loc -> Migrate_parsetree.Ast_412.Parsetree.core_type list -> Migrate_parsetree.Ast_412.Parsetree.core_type
val ptyp_alias : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.core_type -> string -> Migrate_parsetree.Ast_412.Parsetree.core_type
val ptyp_variant : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.row_field list -> Migrate_parsetree.Ast_412.Asttypes.closed_flag -> string list option -> Migrate_parsetree.Ast_412.Parsetree.core_type
val ptyp_poly : loc:Warnings.loc -> string Location.loc list -> Migrate_parsetree.Ast_412.Parsetree.core_type -> Migrate_parsetree.Ast_412.Parsetree.core_type
val ptyp_package : loc:Warnings.loc -> (Ocaml_common.Longident.t Location.loc * (Ocaml_common.Longident.t Location.loc * Migrate_parsetree.Ast_412.Parsetree.core_type) list) -> Migrate_parsetree.Ast_412.Parsetree.core_type
val ptyp_extension : loc:Warnings.loc -> (string Location.loc * Migrate_parsetree.Ast_412.Parsetree.payload) -> Migrate_parsetree.Ast_412.Parsetree.core_type
val pdir_string : loc:Warnings.loc -> string -> Migrate_parsetree.Ast_412.Parsetree.directive_argument
val pdir_int : loc:Warnings.loc -> string -> char option -> Migrate_parsetree.Ast_412.Parsetree.directive_argument
val pdir_ident : loc:Warnings.loc -> Ocaml_common.Longident.t -> Migrate_parsetree.Ast_412.Parsetree.directive_argument
val pdir_bool : loc:Warnings.loc -> bool -> Migrate_parsetree.Ast_412.Parsetree.directive_argument
val pexp_ident : loc:Warnings.loc -> Ocaml_common.Longident.t Location.loc -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_constant : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.constant -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_function : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.case list -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_match : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.case list -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_try : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.case list -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_tuple : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.expression list -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_construct : loc:Warnings.loc -> Ocaml_common.Longident.t Location.loc -> Migrate_parsetree.Ast_412.Parsetree.expression option -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_variant : loc:Warnings.loc -> string -> Migrate_parsetree.Ast_412.Parsetree.expression option -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_record : loc:Warnings.loc -> (Ocaml_common.Longident.t Location.loc * Migrate_parsetree.Ast_412.Parsetree.expression) list -> Migrate_parsetree.Ast_412.Parsetree.expression option -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_array : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.expression list -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_ifthenelse : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.expression option -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_for : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.pattern -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Asttypes.direction_flag -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_constraint : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.core_type -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_send : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.expression -> string Location.loc -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_new : loc:Warnings.loc -> Ocaml_common.Longident.t Location.loc -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_setinstvar : loc:Warnings.loc -> string Location.loc -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_override : loc:Warnings.loc -> (string Location.loc * Migrate_parsetree.Ast_412.Parsetree.expression) list -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_letmodule : loc:Warnings.loc -> string option Location.loc -> Migrate_parsetree.Ast_412.Parsetree.module_expr -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_assert : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_lazy : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_poly : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.core_type option -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_object : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.class_structure -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_newtype : loc:Warnings.loc -> string Location.loc -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_pack : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.module_expr -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_letop : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.letop -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_extension : loc:Warnings.loc -> (string Location.loc * Migrate_parsetree.Ast_412.Parsetree.payload) -> Migrate_parsetree.Ast_412.Parsetree.expression
val pexp_unreachable : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.expression
val extension_constructor : loc:Warnings.loc -> name:string Location.loc -> kind:Migrate_parsetree.Ast_412.Parsetree.extension_constructor_kind -> Migrate_parsetree.Ast_412.Parsetree.extension_constructor
val include_infos : loc:Warnings.loc -> 'a -> 'a Migrate_parsetree.Ast_412.Parsetree.include_infos
val label_declaration : loc:Warnings.loc -> name:string Location.loc -> mutable_:Migrate_parsetree.Ast_412.Asttypes.mutable_flag -> type_:Migrate_parsetree.Ast_412.Parsetree.core_type -> Migrate_parsetree.Ast_412.Parsetree.label_declaration
val location : start:Lexing.position -> end_:Lexing.position -> ghost:bool -> Warnings.loc
val module_binding : loc:Warnings.loc -> name:string option Location.loc -> expr:Migrate_parsetree.Ast_412.Parsetree.module_expr -> Migrate_parsetree.Ast_412.Parsetree.module_binding
val module_declaration : loc:Warnings.loc -> name:string option Location.loc -> type_:Migrate_parsetree.Ast_412.Parsetree.module_type -> Migrate_parsetree.Ast_412.Parsetree.module_declaration
val pmod_ident : loc:Warnings.loc -> Ocaml_common.Longident.t Location.loc -> Migrate_parsetree.Ast_412.Parsetree.module_expr
val pmod_structure : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.structure_item list -> Migrate_parsetree.Ast_412.Parsetree.module_expr
val pmod_unpack : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.module_expr
val pmod_extension : loc:Warnings.loc -> (string Location.loc * Migrate_parsetree.Ast_412.Parsetree.payload) -> Migrate_parsetree.Ast_412.Parsetree.module_expr
val module_substitution : loc:Warnings.loc -> name:string Location.loc -> manifest:Ocaml_common.Longident.t Location.loc -> Migrate_parsetree.Ast_412.Parsetree.module_substitution
val pmty_ident : loc:Warnings.loc -> Ocaml_common.Longident.t Location.loc -> Migrate_parsetree.Ast_412.Parsetree.module_type
val pmty_signature : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.signature_item list -> Migrate_parsetree.Ast_412.Parsetree.module_type
val pmty_typeof : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.module_expr -> Migrate_parsetree.Ast_412.Parsetree.module_type
val pmty_extension : loc:Warnings.loc -> (string Location.loc * Migrate_parsetree.Ast_412.Parsetree.payload) -> Migrate_parsetree.Ast_412.Parsetree.module_type
val pmty_alias : loc:Warnings.loc -> Ocaml_common.Longident.t Location.loc -> Migrate_parsetree.Ast_412.Parsetree.module_type
val module_type_declaration : loc:Warnings.loc -> name:string Location.loc -> type_:Migrate_parsetree.Ast_412.Parsetree.module_type option -> Migrate_parsetree.Ast_412.Parsetree.module_type_declaration
val otag : loc:Warnings.loc -> string Location.loc -> Migrate_parsetree.Ast_412.Parsetree.core_type -> Migrate_parsetree.Ast_412.Parsetree.object_field
val oinherit : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.core_type -> Migrate_parsetree.Ast_412.Parsetree.object_field
val open_infos : loc:Warnings.loc -> expr:'a -> override:Migrate_parsetree.Ast_412.Asttypes.override_flag -> 'a Migrate_parsetree.Ast_412.Parsetree.open_infos
val ppat_any : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_var : loc:Warnings.loc -> string Location.loc -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_alias : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.pattern -> string Location.loc -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_constant : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.constant -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_interval : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.constant -> Migrate_parsetree.Ast_412.Parsetree.constant -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_tuple : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.pattern list -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_construct : loc:Warnings.loc -> Ocaml_common.Longident.t Location.loc -> Migrate_parsetree.Ast_412.Parsetree.pattern option -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_variant : loc:Warnings.loc -> string -> Migrate_parsetree.Ast_412.Parsetree.pattern option -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_record : loc:Warnings.loc -> (Ocaml_common.Longident.t Location.loc * Migrate_parsetree.Ast_412.Parsetree.pattern) list -> Migrate_parsetree.Ast_412.Asttypes.closed_flag -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_array : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.pattern list -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_constraint : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.pattern -> Migrate_parsetree.Ast_412.Parsetree.core_type -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_type : loc:Warnings.loc -> Ocaml_common.Longident.t Location.loc -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_lazy : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.pattern -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_unpack : loc:Warnings.loc -> string option Location.loc -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_exception : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.pattern -> Migrate_parsetree.Ast_412.Parsetree.pattern
val ppat_extension : loc:Warnings.loc -> (string Location.loc * Migrate_parsetree.Ast_412.Parsetree.payload) -> Migrate_parsetree.Ast_412.Parsetree.pattern
val position : fname:string -> lnum:int -> bol:int -> cnum:int -> Lexing.position
val rtag : loc:Warnings.loc -> string Location.loc -> bool -> Migrate_parsetree.Ast_412.Parsetree.core_type list -> Migrate_parsetree.Ast_412.Parsetree.row_field
val rinherit : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.core_type -> Migrate_parsetree.Ast_412.Parsetree.row_field
val psig_value : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.value_description -> Migrate_parsetree.Ast_412.Parsetree.signature_item
val psig_typesubst : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.type_declaration list -> Migrate_parsetree.Ast_412.Parsetree.signature_item
val psig_typext : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.type_extension -> Migrate_parsetree.Ast_412.Parsetree.signature_item
val psig_exception : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.type_exception -> Migrate_parsetree.Ast_412.Parsetree.signature_item
val psig_module : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.module_declaration -> Migrate_parsetree.Ast_412.Parsetree.signature_item
val psig_modsubst : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.module_substitution -> Migrate_parsetree.Ast_412.Parsetree.signature_item
val psig_recmodule : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.module_declaration list -> Migrate_parsetree.Ast_412.Parsetree.signature_item
val psig_modtype : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.module_type_declaration -> Migrate_parsetree.Ast_412.Parsetree.signature_item
val psig_class_type : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.class_type Migrate_parsetree.Ast_412.Parsetree.class_infos list -> Migrate_parsetree.Ast_412.Parsetree.signature_item
val psig_attribute : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.attribute -> Migrate_parsetree.Ast_412.Parsetree.signature_item
val psig_extension : loc:Warnings.loc -> (string Location.loc * Migrate_parsetree.Ast_412.Parsetree.payload) -> Migrate_parsetree.Ast_412.Parsetree.attribute list -> Migrate_parsetree.Ast_412.Parsetree.signature_item
val pstr_primitive : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.value_description -> Migrate_parsetree.Ast_412.Parsetree.structure_item
val pstr_typext : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.type_extension -> Migrate_parsetree.Ast_412.Parsetree.structure_item
val pstr_exception : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.type_exception -> Migrate_parsetree.Ast_412.Parsetree.structure_item
val pstr_module : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.module_binding -> Migrate_parsetree.Ast_412.Parsetree.structure_item
val pstr_recmodule : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.module_binding list -> Migrate_parsetree.Ast_412.Parsetree.structure_item
val pstr_modtype : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.module_type_declaration -> Migrate_parsetree.Ast_412.Parsetree.structure_item
val pstr_class_type : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.class_type Migrate_parsetree.Ast_412.Parsetree.class_infos list -> Migrate_parsetree.Ast_412.Parsetree.structure_item
val pstr_attribute : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.attribute -> Migrate_parsetree.Ast_412.Parsetree.structure_item
val pstr_extension : loc:Warnings.loc -> (string Location.loc * Migrate_parsetree.Ast_412.Parsetree.payload) -> Migrate_parsetree.Ast_412.Parsetree.attribute list -> Migrate_parsetree.Ast_412.Parsetree.structure_item
val toplevel_directive : loc:Warnings.loc -> name:string Location.loc -> arg:Migrate_parsetree.Ast_412.Parsetree.directive_argument option -> Migrate_parsetree.Ast_412.Parsetree.toplevel_directive
val type_declaration : loc:Warnings.loc -> name:string Location.loc -> params:(Migrate_parsetree.Ast_412.Parsetree.core_type * (Migrate_parsetree.Ast_412.Asttypes.variance * Migrate_parsetree.Ast_412.Asttypes.injectivity)) list ->
cstrs:(Migrate_parsetree.Ast_412.Parsetree.core_type * Migrate_parsetree.Ast_412.Parsetree.core_type * Warnings.loc) list -> kind:Migrate_parsetree.Ast_412.Parsetree.type_kind -> private_:Migrate_parsetree.Ast_412.Asttypes.private_flag -> manifest:Migrate_parsetree.Ast_412.Parsetree.core_type option -> Migrate_parsetree.Ast_412.Parsetree.type_declaration
val type_exception : loc:Warnings.loc -> Migrate_parsetree.Ast_412.Parsetree.extension_constructor -> Migrate_parsetree.Ast_412.Parsetree.type_exception
val type_extension : loc:Warnings.loc -> path:Ocaml_common.Longident.t Location.loc -> params:(Migrate_parsetree.Ast_412.Parsetree.core_type * (Migrate_parsetree.Ast_412.Asttypes.variance * Migrate_parsetree.Ast_412.Asttypes.injectivity)) list -> constructors:Migrate_parsetree.Ast_412.Parsetree.extension_constructor list
-> private_:Migrate_parsetree.Ast_412.Asttypes.private_flag -> Migrate_parsetree.Ast_412.Parsetree.type_extension
val value_binding : loc:Warnings.loc -> pat:Migrate_parsetree.Ast_412.Parsetree.pattern -> expr:Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.value_binding
val value_description : loc:Warnings.loc -> name:string Location.loc -> type_:Migrate_parsetree.Ast_412.Parsetree.core_type -> prim:string list -> Migrate_parsetree.Ast_412.Parsetree.value_description
val eint : loc:Location.t -> int -> Migrate_parsetree.Ast_412.Parsetree.expression
val echar : loc:Location.t -> char -> Migrate_parsetree.Ast_412.Parsetree.expression
val estring : loc:Location.t -> string -> Migrate_parsetree.Ast_412.Parsetree.expression
val efloat : loc:Location.t -> string -> Migrate_parsetree.Ast_412.Parsetree.expression
val eint32 : loc:Location.t -> int32 -> Migrate_parsetree.Ast_412.Parsetree.expression
val eint64 : loc:Location.t -> int64 -> Migrate_parsetree.Ast_412.Parsetree.expression
val enativeint : loc:Location.t -> nativeint -> Migrate_parsetree.Ast_412.Parsetree.expression
val ebool : loc:Location.t -> bool -> Migrate_parsetree.Ast_412.Parsetree.expression
val pint : loc:Location.t -> int -> Migrate_parsetree.Ast_412.Parsetree.pattern
val pchar : loc:Location.t -> char -> Migrate_parsetree.Ast_412.Parsetree.pattern
val pstring : loc:Location.t -> string -> Migrate_parsetree.Ast_412.Parsetree.pattern
val pfloat : loc:Location.t -> string -> Migrate_parsetree.Ast_412.Parsetree.pattern
val pint32 : loc:Location.t -> int32 -> Migrate_parsetree.Ast_412.Parsetree.pattern
val pint64 : loc:Location.t -> int64 -> Migrate_parsetree.Ast_412.Parsetree.pattern
val pnativeint : loc:Location.t -> nativeint -> Migrate_parsetree.Ast_412.Parsetree.pattern
val pbool : loc:Location.t -> bool -> Migrate_parsetree.Ast_412.Parsetree.pattern
val eunit : loc:Location.t -> Migrate_parsetree.Ast_412.Parsetree.expression
val punit : loc:Location.t -> Migrate_parsetree.Ast_412.Parsetree.pattern
val evar : loc:Location.t -> string -> Migrate_parsetree.Ast_412.Parsetree.expression
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 : loc:Location.t -> string -> Migrate_parsetree.Ast_412.Parsetree.pattern
val eapply : loc:Location.t -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.expression list -> Migrate_parsetree.Ast_412.Parsetree.expression
Same as pexp_apply but without labels
val eabstract : loc:Location.t -> Migrate_parsetree.Ast_412.Parsetree.pattern list -> Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.expression
val esequence : loc:Location.t -> Migrate_parsetree.Ast_412.Parsetree.expression list -> Migrate_parsetree.Ast_412.Parsetree.expression
val ppat_tuple_opt : loc:Location.t -> Migrate_parsetree.Ast_412.Parsetree.pattern list -> Migrate_parsetree.Ast_412.Parsetree.pattern option
val pexp_tuple_opt : loc:Location.t -> Migrate_parsetree.Ast_412.Parsetree.expression list -> Migrate_parsetree.Ast_412.Parsetree.expression option
val elist : loc:Location.t -> Migrate_parsetree.Ast_412.Parsetree.expression list -> Migrate_parsetree.Ast_412.Parsetree.expression
val plist : loc:Location.t -> Migrate_parsetree.Ast_412.Parsetree.pattern list -> Migrate_parsetree.Ast_412.Parsetree.pattern
val pstr_value_list : loc:Location.t -> Ppxlib_ast.Asttypes.rec_flag -> Migrate_parsetree.Ast_412.Parsetree.value_binding list -> Migrate_parsetree.Ast_412.Parsetree.structure_item list
pstr_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:(Migrate_parsetree.Ast_412.Parsetree.core_type * Ppxlib_ast.Asttypes.variance) list ->
cstrs:(Migrate_parsetree.Ast_412.Parsetree.core_type * Migrate_parsetree.Ast_412.Parsetree.core_type * Location.t) list -> kind:Migrate_parsetree.Ast_412.Parsetree.type_kind -> private_:Ppxlib_ast.Asttypes.private_flag -> manifest:Migrate_parsetree.Ast_412.Parsetree.core_type option -> Migrate_parsetree.Ast_412.Parsetree.type_declaration
val unapplied_type_constr_conv : loc:Location.t -> Longident.t Loc.t -> f:(string -> string) -> Migrate_parsetree.Ast_412.Parsetree.expression
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:
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) -> Migrate_parsetree.Ast_412.Parsetree.expression list -> Migrate_parsetree.Ast_412.Parsetree.expression
val eta_reduce : Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.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:
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 : Migrate_parsetree.Ast_412.Parsetree.expression -> Migrate_parsetree.Ast_412.Parsetree.expression
val eta_reduce_if_possible_and_nonrec : Migrate_parsetree.Ast_412.Parsetree.expression -> rec_flag:Migrate_parsetree.Ast_412.Asttypes.rec_flag -> Migrate_parsetree.Ast_412.Parsetree.expression