diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 731e7a7c2..79247e10f 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -9,3 +9,5 @@ #The commit upgrading to ocamlformat.0.26.1 dab938d3e6f316c20cc141aaff534a0f5f0ab70f +# Upgrade to OCamlformat 0.27.0-preview1 +4a6b0b945c7fd4cf83f82df4b3b36fe22d8b8ec0 diff --git a/.ocamlformat b/.ocamlformat index 90ab2791f..b37f95778 100644 --- a/.ocamlformat +++ b/.ocamlformat @@ -1,3 +1,3 @@ -version=0.26.2 +version=0.27.0-preview1 profile=conventional parse-docstrings=true diff --git a/ast/ast.ml b/ast/ast.ml index 992874a37..23910370c 100644 --- a/ast/ast.ml +++ b/ast/ast.ml @@ -121,7 +121,8 @@ and constant = Parsetree.constant = (** Constant string such as ["constant"] or [{delim|other constant|delim}]. - The location span the content of the string, without the delimiters. *) + The location span the content of the string, without the delimiters. + *) | Pconst_float of string * char option (** Float constant such as [3.4], [2e5] or [1.4e-4]. @@ -457,7 +458,8 @@ and expression_desc = Parsetree.expression_desc = | Pexp_assert of expression (** [assert E]. - Note: [assert false] is treated in a special way by the type-checker. *) + Note: [assert false] is treated in a special way by the type-checker. + *) | Pexp_lazy of expression (** [lazy E] *) | Pexp_poly of expression * core_type option (** Used for method bodies. @@ -655,7 +657,8 @@ and extension_constructor_kind = Parsetree.extension_constructor_kind = } } *) | Pext_rebind of longident_loc - (** [Pext_rebind(D)] re-export the constructor [D] with the new name [C] *) + (** [Pext_rebind(D)] re-export the constructor [D] with the new name [C] + *) (** {1 Class language} *) (** {2 Type expressions for the class language} *) @@ -797,7 +800,8 @@ and class_field_desc = Parsetree.class_field_desc = - [inherit! CE] when [flag] is {{!Asttypes.override_flag.Override} [Override]} and [s] is [None], - [inherit! CE as x] when [flag] is - {{!Asttypes.override_flag.Override} [Override]} and [s] is [Some x] *) + {{!Asttypes.override_flag.Override} [Override]} and [s] is [Some x] + *) | Pcf_val of (label loc * mutable_flag * class_field_kind) (** [Pcf_val(x,flag, kind)] represents: @@ -1664,8 +1668,8 @@ class virtual map = let pld_attributes = self#attributes pld_attributes in { pld_name; pld_mutable; pld_type; pld_loc; pld_attributes } - method constructor_declaration - : constructor_declaration -> constructor_declaration = + method constructor_declaration : + constructor_declaration -> constructor_declaration = fun { pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes } -> let pcd_name = self#loc self#string pcd_name in let pcd_vars = self#list (self#loc self#string) pcd_vars in @@ -1675,8 +1679,8 @@ class virtual map = let pcd_attributes = self#attributes pcd_attributes in { pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes } - method constructor_arguments - : constructor_arguments -> constructor_arguments = + method constructor_arguments : + constructor_arguments -> constructor_arguments = fun x -> match x with | Pcstr_tuple a -> @@ -1725,8 +1729,8 @@ class virtual map = ptyext_attributes; } - method extension_constructor - : extension_constructor -> extension_constructor = + method extension_constructor : + extension_constructor -> extension_constructor = fun { pext_name; pext_kind; pext_loc; pext_attributes } -> let pext_name = self#loc self#string pext_name in let pext_kind = self#extension_constructor_kind pext_kind in @@ -1743,8 +1747,8 @@ class virtual map = let ptyexn_attributes = self#attributes ptyexn_attributes in { ptyexn_constructor; ptyexn_loc; ptyexn_attributes } - method extension_constructor_kind - : extension_constructor_kind -> extension_constructor_kind = + method extension_constructor_kind : + extension_constructor_kind -> extension_constructor_kind = fun x -> match x with | Pext_decl (a, b, c) -> @@ -1799,8 +1803,8 @@ class virtual map = let pctf_attributes = self#attributes pctf_attributes in { pctf_desc; pctf_loc; pctf_attributes } - method class_type_field_desc - : class_type_field_desc -> class_type_field_desc = + method class_type_field_desc : + class_type_field_desc -> class_type_field_desc = fun x -> match x with | Pctf_inherit a -> @@ -1871,8 +1875,8 @@ class virtual map = method class_description : class_description -> class_description = self#class_infos self#class_type - method class_type_declaration - : class_type_declaration -> class_type_declaration = + method class_type_declaration : + class_type_declaration -> class_type_declaration = self#class_infos self#class_type method class_expr : class_expr -> class_expr = @@ -2121,8 +2125,8 @@ class virtual map = let pms_loc = self#location pms_loc in { pms_name; pms_manifest; pms_attributes; pms_loc } - method module_type_declaration - : module_type_declaration -> module_type_declaration = + method module_type_declaration : + module_type_declaration -> module_type_declaration = fun { pmtd_name; pmtd_type; pmtd_attributes; pmtd_loc } -> let pmtd_name = self#loc self#string pmtd_name in let pmtd_type = self#option self#module_type pmtd_type in @@ -2144,8 +2148,8 @@ class virtual map = method open_declaration : open_declaration -> open_declaration = self#open_infos self#module_expr - method include_infos - : 'a. ('a -> 'a) -> 'a include_infos -> 'a include_infos = + method include_infos : + 'a. ('a -> 'a) -> 'a include_infos -> 'a include_infos = fun _a { pincl_mod; pincl_loc; pincl_attributes } -> let pincl_mod = _a pincl_mod in let pincl_loc = self#location pincl_loc in @@ -2321,8 +2325,8 @@ class virtual map = let pdira_loc = self#location pdira_loc in { pdira_desc; pdira_loc } - method directive_argument_desc - : directive_argument_desc -> directive_argument_desc = + method directive_argument_desc : + directive_argument_desc -> directive_argument_desc = fun x -> match x with | Pdir_string a -> @@ -3735,7 +3739,8 @@ class virtual ['acc] fold = acc method constructor_declaration : constructor_declaration -> 'acc -> 'acc = - fun { pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes } acc -> + fun { pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes } + acc -> let acc = self#loc self#string pcd_name acc in let acc = self#list (self#loc self#string) pcd_vars acc in let acc = self#constructor_arguments pcd_args acc in @@ -3797,8 +3802,8 @@ class virtual ['acc] fold = let acc = self#attributes ptyexn_attributes acc in acc - method extension_constructor_kind - : extension_constructor_kind -> 'acc -> 'acc = + method extension_constructor_kind : + extension_constructor_kind -> 'acc -> 'acc = fun x acc -> match x with | Pext_decl (a, b, c) -> @@ -3876,8 +3881,8 @@ class virtual ['acc] fold = | Pctf_attribute a -> self#attribute a acc | Pctf_extension a -> self#extension a acc - method class_infos - : 'a. ('a -> 'acc -> 'acc) -> 'a class_infos -> 'acc -> 'acc = + method class_infos : + 'a. ('a -> 'acc -> 'acc) -> 'a class_infos -> 'acc -> 'acc = fun _a { pci_virt; pci_params; pci_name; pci_expr; pci_loc; pci_attributes } acc -> @@ -4103,8 +4108,8 @@ class virtual ['acc] fold = let acc = self#location pmtd_loc acc in acc - method open_infos - : 'a. ('a -> 'acc -> 'acc) -> 'a open_infos -> 'acc -> 'acc = + method open_infos : + 'a. ('a -> 'acc -> 'acc) -> 'a open_infos -> 'acc -> 'acc = fun _a { popen_expr; popen_override; popen_loc; popen_attributes } acc -> let acc = _a popen_expr acc in let acc = self#override_flag popen_override acc in @@ -4118,8 +4123,8 @@ class virtual ['acc] fold = method open_declaration : open_declaration -> 'acc -> 'acc = self#open_infos self#module_expr - method include_infos - : 'a. ('a -> 'acc -> 'acc) -> 'a include_infos -> 'acc -> 'acc = + method include_infos : + 'a. ('a -> 'acc -> 'acc) -> 'a include_infos -> 'acc -> 'acc = fun _a { pincl_mod; pincl_loc; pincl_attributes } acc -> let acc = _a pincl_mod acc in let acc = self#location pincl_loc acc in @@ -4307,8 +4312,8 @@ class virtual ['acc] fold_map = method location_stack : location_stack -> 'acc -> location_stack * 'acc = self#list self#location - method loc - : 'a. ('a -> 'acc -> 'a * 'acc) -> 'a loc -> 'acc -> 'a loc * 'acc = + method loc : + 'a. ('a -> 'acc -> 'a * 'acc) -> 'a loc -> 'acc -> 'a loc * 'acc = fun _a { txt; loc } acc -> let txt, acc = _a txt acc in let loc, acc = self#location loc acc in @@ -4517,8 +4522,8 @@ class virtual ['acc] fold_map = let pof_attributes, acc = self#attributes pof_attributes acc in ({ pof_desc; pof_loc; pof_attributes }, acc) - method object_field_desc - : object_field_desc -> 'acc -> object_field_desc * 'acc = + method object_field_desc : + object_field_desc -> 'acc -> object_field_desc * 'acc = fun x acc -> match x with | Otag (a, b) -> @@ -4812,8 +4817,8 @@ class virtual ['acc] fold_map = let pbop_loc, acc = self#location pbop_loc acc in ({ pbop_op; pbop_pat; pbop_exp; pbop_loc }, acc) - method value_description - : value_description -> 'acc -> value_description * 'acc = + method value_description : + value_description -> 'acc -> value_description * 'acc = fun { pval_name; pval_type; pval_prim; pval_attributes; pval_loc } acc -> let pval_name, acc = self#loc self#string pval_name acc in let pval_type, acc = self#core_type pval_type acc in @@ -4822,8 +4827,8 @@ class virtual ['acc] fold_map = let pval_loc, acc = self#location pval_loc acc in ({ pval_name; pval_type; pval_prim; pval_attributes; pval_loc }, acc) - method type_declaration - : type_declaration -> 'acc -> type_declaration * 'acc = + method type_declaration : + type_declaration -> 'acc -> type_declaration * 'acc = fun { ptype_name; ptype_params; @@ -4889,8 +4894,8 @@ class virtual ['acc] fold_map = (Ptype_record a, acc) | Ptype_open -> (Ptype_open, acc) - method label_declaration - : label_declaration -> 'acc -> label_declaration * 'acc = + method label_declaration : + label_declaration -> 'acc -> label_declaration * 'acc = fun { pld_name; pld_mutable; pld_type; pld_loc; pld_attributes } acc -> let pld_name, acc = self#loc self#string pld_name acc in let pld_mutable, acc = self#mutable_flag pld_mutable acc in @@ -4899,9 +4904,10 @@ class virtual ['acc] fold_map = let pld_attributes, acc = self#attributes pld_attributes acc in ({ pld_name; pld_mutable; pld_type; pld_loc; pld_attributes }, acc) - method constructor_declaration - : constructor_declaration -> 'acc -> constructor_declaration * 'acc = - fun { pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes } acc -> + method constructor_declaration : + constructor_declaration -> 'acc -> constructor_declaration * 'acc = + fun { pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes } + acc -> let pcd_name, acc = self#loc self#string pcd_name acc in let pcd_vars, acc = self#list (self#loc self#string) pcd_vars acc in let pcd_args, acc = self#constructor_arguments pcd_args acc in @@ -4910,8 +4916,8 @@ class virtual ['acc] fold_map = let pcd_attributes, acc = self#attributes pcd_attributes acc in ({ pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes }, acc) - method constructor_arguments - : constructor_arguments -> 'acc -> constructor_arguments * 'acc = + method constructor_arguments : + constructor_arguments -> 'acc -> constructor_arguments * 'acc = fun x acc -> match x with | Pcstr_tuple a -> @@ -4961,8 +4967,8 @@ class virtual ['acc] fold_map = }, acc ) - method extension_constructor - : extension_constructor -> 'acc -> extension_constructor * 'acc = + method extension_constructor : + extension_constructor -> 'acc -> extension_constructor * 'acc = fun { pext_name; pext_kind; pext_loc; pext_attributes } acc -> let pext_name, acc = self#loc self#string pext_name acc in let pext_kind, acc = self#extension_constructor_kind pext_kind acc in @@ -4979,10 +4985,9 @@ class virtual ['acc] fold_map = let ptyexn_attributes, acc = self#attributes ptyexn_attributes acc in ({ ptyexn_constructor; ptyexn_loc; ptyexn_attributes }, acc) - method extension_constructor_kind - : extension_constructor_kind -> - 'acc -> - extension_constructor_kind * 'acc = + method extension_constructor_kind : + extension_constructor_kind -> 'acc -> extension_constructor_kind * 'acc + = fun x acc -> match x with | Pext_decl (a, b, c) -> @@ -5032,16 +5037,16 @@ class virtual ['acc] fold_map = in ({ pcsig_self; pcsig_fields }, acc) - method class_type_field - : class_type_field -> 'acc -> class_type_field * 'acc = + method class_type_field : + class_type_field -> 'acc -> class_type_field * 'acc = fun { pctf_desc; pctf_loc; pctf_attributes } acc -> let pctf_desc, acc = self#class_type_field_desc pctf_desc acc in let pctf_loc, acc = self#location pctf_loc acc in let pctf_attributes, acc = self#attributes pctf_attributes acc in ({ pctf_desc; pctf_loc; pctf_attributes }, acc) - method class_type_field_desc - : class_type_field_desc -> 'acc -> class_type_field_desc * 'acc = + method class_type_field_desc : + class_type_field_desc -> 'acc -> class_type_field_desc * 'acc = fun x acc -> match x with | Pctf_inherit a -> @@ -5085,12 +5090,12 @@ class virtual ['acc] fold_map = let a, acc = self#extension a acc in (Pctf_extension a, acc) - method class_infos - : 'a. - ('a -> 'acc -> 'a * 'acc) -> - 'a class_infos -> - 'acc -> - 'a class_infos * 'acc = + method class_infos : + 'a. + ('a -> 'acc -> 'a * 'acc) -> + 'a class_infos -> + 'acc -> + 'a class_infos * 'acc = fun _a { pci_virt; pci_params; pci_name; pci_expr; pci_loc; pci_attributes } acc -> @@ -5116,12 +5121,12 @@ class virtual ['acc] fold_map = ( { pci_virt; pci_params; pci_name; pci_expr; pci_loc; pci_attributes }, acc ) - method class_description - : class_description -> 'acc -> class_description * 'acc = + method class_description : + class_description -> 'acc -> class_description * 'acc = self#class_infos self#class_type - method class_type_declaration - : class_type_declaration -> 'acc -> class_type_declaration * 'acc = + method class_type_declaration : + class_type_declaration -> 'acc -> class_type_declaration * 'acc = self#class_infos self#class_type method class_expr : class_expr -> 'acc -> class_expr * 'acc = @@ -5188,8 +5193,8 @@ class virtual ['acc] fold_map = let pcf_attributes, acc = self#attributes pcf_attributes acc in ({ pcf_desc; pcf_loc; pcf_attributes }, acc) - method class_field_desc - : class_field_desc -> 'acc -> class_field_desc * 'acc = + method class_field_desc : + class_field_desc -> 'acc -> class_field_desc * 'acc = fun x acc -> match x with | Pcf_inherit (a, b, c) -> @@ -5236,8 +5241,8 @@ class virtual ['acc] fold_map = let a, acc = self#extension a acc in (Pcf_extension a, acc) - method class_field_kind - : class_field_kind -> 'acc -> class_field_kind * 'acc = + method class_field_kind : + class_field_kind -> 'acc -> class_field_kind * 'acc = fun x acc -> match x with | Cfk_virtual a -> @@ -5248,8 +5253,8 @@ class virtual ['acc] fold_map = let b, acc = self#expression b acc in (Cfk_concrete (a, b), acc) - method class_declaration - : class_declaration -> 'acc -> class_declaration * 'acc = + method class_declaration : + class_declaration -> 'acc -> class_declaration * 'acc = self#class_infos self#class_expr method module_type : module_type -> 'acc -> module_type * 'acc = @@ -5259,8 +5264,8 @@ class virtual ['acc] fold_map = let pmty_attributes, acc = self#attributes pmty_attributes acc in ({ pmty_desc; pmty_loc; pmty_attributes }, acc) - method module_type_desc - : module_type_desc -> 'acc -> module_type_desc * 'acc = + method module_type_desc : + module_type_desc -> 'acc -> module_type_desc * 'acc = fun x acc -> match x with | Pmty_ident a -> @@ -5287,8 +5292,8 @@ class virtual ['acc] fold_map = let a, acc = self#longident_loc a acc in (Pmty_alias a, acc) - method functor_parameter - : functor_parameter -> 'acc -> functor_parameter * 'acc = + method functor_parameter : + functor_parameter -> 'acc -> functor_parameter * 'acc = fun x acc -> match x with | Unit -> (Unit, acc) @@ -5306,8 +5311,8 @@ class virtual ['acc] fold_map = let psig_loc, acc = self#location psig_loc acc in ({ psig_desc; psig_loc }, acc) - method signature_item_desc - : signature_item_desc -> 'acc -> signature_item_desc * 'acc = + method signature_item_desc : + signature_item_desc -> 'acc -> signature_item_desc * 'acc = fun x acc -> match x with | Psig_value a -> @@ -5361,8 +5366,8 @@ class virtual ['acc] fold_map = let b, acc = self#attributes b acc in (Psig_extension (a, b), acc) - method module_declaration - : module_declaration -> 'acc -> module_declaration * 'acc = + method module_declaration : + module_declaration -> 'acc -> module_declaration * 'acc = fun { pmd_name; pmd_type; pmd_attributes; pmd_loc } acc -> let pmd_name, acc = self#loc (self#option self#string) pmd_name acc in let pmd_type, acc = self#module_type pmd_type acc in @@ -5370,8 +5375,8 @@ class virtual ['acc] fold_map = let pmd_loc, acc = self#location pmd_loc acc in ({ pmd_name; pmd_type; pmd_attributes; pmd_loc }, acc) - method module_substitution - : module_substitution -> 'acc -> module_substitution * 'acc = + method module_substitution : + module_substitution -> 'acc -> module_substitution * 'acc = fun { pms_name; pms_manifest; pms_attributes; pms_loc } acc -> let pms_name, acc = self#loc self#string pms_name acc in let pms_manifest, acc = self#longident_loc pms_manifest acc in @@ -5379,8 +5384,8 @@ class virtual ['acc] fold_map = let pms_loc, acc = self#location pms_loc acc in ({ pms_name; pms_manifest; pms_attributes; pms_loc }, acc) - method module_type_declaration - : module_type_declaration -> 'acc -> module_type_declaration * 'acc = + method module_type_declaration : + module_type_declaration -> 'acc -> module_type_declaration * 'acc = fun { pmtd_name; pmtd_type; pmtd_attributes; pmtd_loc } acc -> let pmtd_name, acc = self#loc self#string pmtd_name acc in let pmtd_type, acc = self#option self#module_type pmtd_type acc in @@ -5388,12 +5393,12 @@ class virtual ['acc] fold_map = let pmtd_loc, acc = self#location pmtd_loc acc in ({ pmtd_name; pmtd_type; pmtd_attributes; pmtd_loc }, acc) - method open_infos - : 'a. - ('a -> 'acc -> 'a * 'acc) -> - 'a open_infos -> - 'acc -> - 'a open_infos * 'acc = + method open_infos : + 'a. + ('a -> 'acc -> 'a * 'acc) -> + 'a open_infos -> + 'acc -> + 'a open_infos * 'acc = fun _a { popen_expr; popen_override; popen_loc; popen_attributes } acc -> let popen_expr, acc = _a popen_expr acc in let popen_override, acc = self#override_flag popen_override acc in @@ -5401,32 +5406,32 @@ class virtual ['acc] fold_map = let popen_attributes, acc = self#attributes popen_attributes acc in ({ popen_expr; popen_override; popen_loc; popen_attributes }, acc) - method open_description - : open_description -> 'acc -> open_description * 'acc = + method open_description : + open_description -> 'acc -> open_description * 'acc = self#open_infos self#longident_loc - method open_declaration - : open_declaration -> 'acc -> open_declaration * 'acc = + method open_declaration : + open_declaration -> 'acc -> open_declaration * 'acc = self#open_infos self#module_expr - method include_infos - : 'a. - ('a -> 'acc -> 'a * 'acc) -> - 'a include_infos -> - 'acc -> - 'a include_infos * 'acc = + method include_infos : + 'a. + ('a -> 'acc -> 'a * 'acc) -> + 'a include_infos -> + 'acc -> + 'a include_infos * 'acc = fun _a { pincl_mod; pincl_loc; pincl_attributes } acc -> let pincl_mod, acc = _a pincl_mod acc in let pincl_loc, acc = self#location pincl_loc acc in let pincl_attributes, acc = self#attributes pincl_attributes acc in ({ pincl_mod; pincl_loc; pincl_attributes }, acc) - method include_description - : include_description -> 'acc -> include_description * 'acc = + method include_description : + include_description -> 'acc -> include_description * 'acc = self#include_infos self#module_type - method include_declaration - : include_declaration -> 'acc -> include_declaration * 'acc = + method include_declaration : + include_declaration -> 'acc -> include_declaration * 'acc = self#include_infos self#module_expr method with_constraint : with_constraint -> 'acc -> with_constraint * 'acc = @@ -5464,8 +5469,8 @@ class virtual ['acc] fold_map = let pmod_attributes, acc = self#attributes pmod_attributes acc in ({ pmod_desc; pmod_loc; pmod_attributes }, acc) - method module_expr_desc - : module_expr_desc -> 'acc -> module_expr_desc * 'acc = + method module_expr_desc : + module_expr_desc -> 'acc -> module_expr_desc * 'acc = fun x acc -> match x with | Pmod_ident a -> @@ -5502,8 +5507,8 @@ class virtual ['acc] fold_map = let pstr_loc, acc = self#location pstr_loc acc in ({ pstr_desc; pstr_loc }, acc) - method structure_item_desc - : structure_item_desc -> 'acc -> structure_item_desc * 'acc = + method structure_item_desc : + structure_item_desc -> 'acc -> structure_item_desc * 'acc = fun x acc -> match x with | Pstr_eval (a, b) -> @@ -5582,23 +5587,23 @@ class virtual ['acc] fold_map = let a, acc = self#toplevel_directive a acc in (Ptop_dir a, acc) - method toplevel_directive - : toplevel_directive -> 'acc -> toplevel_directive * 'acc = + method toplevel_directive : + toplevel_directive -> 'acc -> toplevel_directive * 'acc = fun { pdir_name; pdir_arg; pdir_loc } acc -> let pdir_name, acc = self#loc self#string pdir_name acc in let pdir_arg, acc = self#option self#directive_argument pdir_arg acc in let pdir_loc, acc = self#location pdir_loc acc in ({ pdir_name; pdir_arg; pdir_loc }, acc) - method directive_argument - : directive_argument -> 'acc -> directive_argument * 'acc = + method directive_argument : + directive_argument -> 'acc -> directive_argument * 'acc = fun { pdira_desc; pdira_loc } acc -> let pdira_desc, acc = self#directive_argument_desc pdira_desc acc in let pdira_loc, acc = self#location pdira_loc acc in ({ pdira_desc; pdira_loc }, acc) - method directive_argument_desc - : directive_argument_desc -> 'acc -> directive_argument_desc * 'acc = + method directive_argument_desc : + directive_argument_desc -> 'acc -> directive_argument_desc * 'acc = fun x acc -> match x with | Pdir_string a -> @@ -6224,9 +6229,10 @@ class virtual ['ctx] map_with_context = let pld_attributes = self#attributes ctx pld_attributes in { pld_name; pld_mutable; pld_type; pld_loc; pld_attributes } - method constructor_declaration - : 'ctx -> constructor_declaration -> constructor_declaration = - fun ctx { pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes } -> + method constructor_declaration : + 'ctx -> constructor_declaration -> constructor_declaration = + fun ctx + { pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes } -> let pcd_name = self#loc self#string ctx pcd_name in let pcd_vars = self#list (self#loc self#string) ctx pcd_vars in let pcd_args = self#constructor_arguments ctx pcd_args in @@ -6235,8 +6241,8 @@ class virtual ['ctx] map_with_context = let pcd_attributes = self#attributes ctx pcd_attributes in { pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes } - method constructor_arguments - : 'ctx -> constructor_arguments -> constructor_arguments = + method constructor_arguments : + 'ctx -> constructor_arguments -> constructor_arguments = fun ctx x -> match x with | Pcstr_tuple a -> @@ -6286,8 +6292,8 @@ class virtual ['ctx] map_with_context = ptyext_attributes; } - method extension_constructor - : 'ctx -> extension_constructor -> extension_constructor = + method extension_constructor : + 'ctx -> extension_constructor -> extension_constructor = fun ctx { pext_name; pext_kind; pext_loc; pext_attributes } -> let pext_name = self#loc self#string ctx pext_name in let pext_kind = self#extension_constructor_kind ctx pext_kind in @@ -6304,8 +6310,8 @@ class virtual ['ctx] map_with_context = let ptyexn_attributes = self#attributes ctx ptyexn_attributes in { ptyexn_constructor; ptyexn_loc; ptyexn_attributes } - method extension_constructor_kind - : 'ctx -> extension_constructor_kind -> extension_constructor_kind = + method extension_constructor_kind : + 'ctx -> extension_constructor_kind -> extension_constructor_kind = fun ctx x -> match x with | Pext_decl (a, b, c) -> @@ -6360,8 +6366,8 @@ class virtual ['ctx] map_with_context = let pctf_attributes = self#attributes ctx pctf_attributes in { pctf_desc; pctf_loc; pctf_attributes } - method class_type_field_desc - : 'ctx -> class_type_field_desc -> class_type_field_desc = + method class_type_field_desc : + 'ctx -> class_type_field_desc -> class_type_field_desc = fun ctx x -> match x with | Pctf_inherit a -> @@ -6405,8 +6411,8 @@ class virtual ['ctx] map_with_context = let a = self#extension ctx a in Pctf_extension a - method class_infos - : 'a. ('ctx -> 'a -> 'a) -> 'ctx -> 'a class_infos -> 'a class_infos = + method class_infos : + 'a. ('ctx -> 'a -> 'a) -> 'ctx -> 'a class_infos -> 'a class_infos = fun _a ctx { pci_virt; pci_params; pci_name; pci_expr; pci_loc; pci_attributes } -> let pci_virt = self#virtual_flag ctx pci_virt in @@ -6433,8 +6439,8 @@ class virtual ['ctx] map_with_context = method class_description : 'ctx -> class_description -> class_description = self#class_infos self#class_type - method class_type_declaration - : 'ctx -> class_type_declaration -> class_type_declaration = + method class_type_declaration : + 'ctx -> class_type_declaration -> class_type_declaration = self#class_infos self#class_type method class_expr : 'ctx -> class_expr -> class_expr = @@ -6614,8 +6620,8 @@ class virtual ['ctx] map_with_context = let psig_loc = self#location ctx psig_loc in { psig_desc; psig_loc } - method signature_item_desc - : 'ctx -> signature_item_desc -> signature_item_desc = + method signature_item_desc : + 'ctx -> signature_item_desc -> signature_item_desc = fun ctx x -> match x with | Psig_value a -> @@ -6678,8 +6684,8 @@ class virtual ['ctx] map_with_context = let pmd_loc = self#location ctx pmd_loc in { pmd_name; pmd_type; pmd_attributes; pmd_loc } - method module_substitution - : 'ctx -> module_substitution -> module_substitution = + method module_substitution : + 'ctx -> module_substitution -> module_substitution = fun ctx { pms_name; pms_manifest; pms_attributes; pms_loc } -> let pms_name = self#loc self#string ctx pms_name in let pms_manifest = self#longident_loc ctx pms_manifest in @@ -6687,8 +6693,8 @@ class virtual ['ctx] map_with_context = let pms_loc = self#location ctx pms_loc in { pms_name; pms_manifest; pms_attributes; pms_loc } - method module_type_declaration - : 'ctx -> module_type_declaration -> module_type_declaration = + method module_type_declaration : + 'ctx -> module_type_declaration -> module_type_declaration = fun ctx { pmtd_name; pmtd_type; pmtd_attributes; pmtd_loc } -> let pmtd_name = self#loc self#string ctx pmtd_name in let pmtd_type = self#option self#module_type ctx pmtd_type in @@ -6696,8 +6702,8 @@ class virtual ['ctx] map_with_context = let pmtd_loc = self#location ctx pmtd_loc in { pmtd_name; pmtd_type; pmtd_attributes; pmtd_loc } - method open_infos - : 'a. ('ctx -> 'a -> 'a) -> 'ctx -> 'a open_infos -> 'a open_infos = + method open_infos : + 'a. ('ctx -> 'a -> 'a) -> 'ctx -> 'a open_infos -> 'a open_infos = fun _a ctx { popen_expr; popen_override; popen_loc; popen_attributes } -> let popen_expr = _a ctx popen_expr in let popen_override = self#override_flag ctx popen_override in @@ -6711,21 +6717,20 @@ class virtual ['ctx] map_with_context = method open_declaration : 'ctx -> open_declaration -> open_declaration = self#open_infos self#module_expr - method include_infos - : 'a. ('ctx -> 'a -> 'a) -> 'ctx -> 'a include_infos -> 'a include_infos - = + method include_infos : + 'a. ('ctx -> 'a -> 'a) -> 'ctx -> 'a include_infos -> 'a include_infos = fun _a ctx { pincl_mod; pincl_loc; pincl_attributes } -> let pincl_mod = _a ctx pincl_mod in let pincl_loc = self#location ctx pincl_loc in let pincl_attributes = self#attributes ctx pincl_attributes in { pincl_mod; pincl_loc; pincl_attributes } - method include_description - : 'ctx -> include_description -> include_description = + method include_description : + 'ctx -> include_description -> include_description = self#include_infos self#module_type - method include_declaration - : 'ctx -> include_declaration -> include_declaration = + method include_declaration : + 'ctx -> include_declaration -> include_declaration = self#include_infos self#module_expr method with_constraint : 'ctx -> with_constraint -> with_constraint = @@ -6800,8 +6805,8 @@ class virtual ['ctx] map_with_context = let pstr_loc = self#location ctx pstr_loc in { pstr_desc; pstr_loc } - method structure_item_desc - : 'ctx -> structure_item_desc -> structure_item_desc = + method structure_item_desc : + 'ctx -> structure_item_desc -> structure_item_desc = fun ctx x -> match x with | Pstr_eval (a, b) -> @@ -6895,8 +6900,8 @@ class virtual ['ctx] map_with_context = let pdira_loc = self#location ctx pdira_loc in { pdira_desc; pdira_loc } - method directive_argument_desc - : 'ctx -> directive_argument_desc -> directive_argument_desc = + method directive_argument_desc : + 'ctx -> directive_argument_desc -> directive_argument_desc = fun ctx x -> match x with | Pdir_string a -> @@ -8456,8 +8461,8 @@ class virtual ['ctx, 'res] lift_map_with_context = method location_stack : 'ctx -> location_stack -> location_stack * 'res = self#list self#location - method loc - : 'a. ('ctx -> 'a -> 'a * 'res) -> 'ctx -> 'a loc -> 'a loc * 'res = + method loc : + 'a. ('ctx -> 'a -> 'a * 'res) -> 'ctx -> 'a loc -> 'a loc * 'res = fun _a ctx { txt; loc } -> let txt = _a ctx txt in let loc = self#location ctx loc in @@ -8741,8 +8746,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pof_attributes", Stdlib.snd pof_attributes); ] ) - method object_field_desc - : 'ctx -> object_field_desc -> object_field_desc * 'res = + method object_field_desc : + 'ctx -> object_field_desc -> object_field_desc * 'res = fun ctx x -> match x with | Otag (a, b) -> @@ -9175,8 +9180,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pbop_loc", Stdlib.snd pbop_loc); ] ) - method value_description - : 'ctx -> value_description -> value_description * 'res = + method value_description : + 'ctx -> value_description -> value_description * 'res = fun ctx { pval_name; pval_type; pval_prim; pval_attributes; pval_loc } -> let pval_name = self#loc self#string ctx pval_name in let pval_type = self#core_type ctx pval_type in @@ -9199,8 +9204,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pval_loc", Stdlib.snd pval_loc); ] ) - method type_declaration - : 'ctx -> type_declaration -> type_declaration * 'res = + method type_declaration : + 'ctx -> type_declaration -> type_declaration * 'res = fun ctx { ptype_name; @@ -9280,8 +9285,8 @@ class virtual ['ctx, 'res] lift_map_with_context = self#constr ctx "Ptype_record" [ Stdlib.snd a ] ) | Ptype_open -> (Ptype_open, self#constr ctx "Ptype_open" []) - method label_declaration - : 'ctx -> label_declaration -> label_declaration * 'res = + method label_declaration : + 'ctx -> label_declaration -> label_declaration * 'res = fun ctx { pld_name; pld_mutable; pld_type; pld_loc; pld_attributes } -> let pld_name = self#loc self#string ctx pld_name in let pld_mutable = self#mutable_flag ctx pld_mutable in @@ -9304,9 +9309,10 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pld_attributes", Stdlib.snd pld_attributes); ] ) - method constructor_declaration - : 'ctx -> constructor_declaration -> constructor_declaration * 'res = - fun ctx { pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes } -> + method constructor_declaration : + 'ctx -> constructor_declaration -> constructor_declaration * 'res = + fun ctx + { pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes } -> let pcd_name = self#loc self#string ctx pcd_name in let pcd_vars = self#list (self#loc self#string) ctx pcd_vars in let pcd_args = self#constructor_arguments ctx pcd_args in @@ -9331,8 +9337,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pcd_attributes", Stdlib.snd pcd_attributes); ] ) - method constructor_arguments - : 'ctx -> constructor_arguments -> constructor_arguments * 'res = + method constructor_arguments : + 'ctx -> constructor_arguments -> constructor_arguments * 'res = fun ctx x -> match x with | Pcstr_tuple a -> @@ -9395,8 +9401,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("ptyext_attributes", Stdlib.snd ptyext_attributes); ] ) - method extension_constructor - : 'ctx -> extension_constructor -> extension_constructor * 'res = + method extension_constructor : + 'ctx -> extension_constructor -> extension_constructor * 'res = fun ctx { pext_name; pext_kind; pext_loc; pext_attributes } -> let pext_name = self#loc self#string ctx pext_name in let pext_kind = self#extension_constructor_kind ctx pext_kind in @@ -9435,10 +9441,9 @@ class virtual ['ctx, 'res] lift_map_with_context = ("ptyexn_attributes", Stdlib.snd ptyexn_attributes); ] ) - method extension_constructor_kind - : 'ctx -> - extension_constructor_kind -> - extension_constructor_kind * 'res = + method extension_constructor_kind : + 'ctx -> extension_constructor_kind -> extension_constructor_kind * 'res + = fun ctx x -> match x with | Pext_decl (a, b, c) -> @@ -9513,8 +9518,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pcsig_fields", Stdlib.snd pcsig_fields); ] ) - method class_type_field - : 'ctx -> class_type_field -> class_type_field * 'res = + method class_type_field : + 'ctx -> class_type_field -> class_type_field * 'res = fun ctx { pctf_desc; pctf_loc; pctf_attributes } -> let pctf_desc = self#class_type_field_desc ctx pctf_desc in let pctf_loc = self#location ctx pctf_loc in @@ -9531,8 +9536,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pctf_attributes", Stdlib.snd pctf_attributes); ] ) - method class_type_field_desc - : 'ctx -> class_type_field_desc -> class_type_field_desc * 'res = + method class_type_field_desc : + 'ctx -> class_type_field_desc -> class_type_field_desc * 'res = fun ctx x -> match x with | Pctf_inherit a -> @@ -9589,12 +9594,12 @@ class virtual ['ctx, 'res] lift_map_with_context = ( Pctf_extension (Stdlib.fst a), self#constr ctx "Pctf_extension" [ Stdlib.snd a ] ) - method class_infos - : 'a. - ('ctx -> 'a -> 'a * 'res) -> - 'ctx -> - 'a class_infos -> - 'a class_infos * 'res = + method class_infos : + 'a. + ('ctx -> 'a -> 'a * 'res) -> + 'ctx -> + 'a class_infos -> + 'a class_infos * 'res = fun _a ctx { pci_virt; pci_params; pci_name; pci_expr; pci_loc; pci_attributes } -> let pci_virt = self#virtual_flag ctx pci_virt in @@ -9636,12 +9641,12 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pci_attributes", Stdlib.snd pci_attributes); ] ) - method class_description - : 'ctx -> class_description -> class_description * 'res = + method class_description : + 'ctx -> class_description -> class_description * 'res = self#class_infos self#class_type - method class_type_declaration - : 'ctx -> class_type_declaration -> class_type_declaration * 'res = + method class_type_declaration : + 'ctx -> class_type_declaration -> class_type_declaration * 'res = self#class_infos self#class_type method class_expr : 'ctx -> class_expr -> class_expr * 'res = @@ -9747,8 +9752,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pcf_attributes", Stdlib.snd pcf_attributes); ] ) - method class_field_desc - : 'ctx -> class_field_desc -> class_field_desc * 'res = + method class_field_desc : + 'ctx -> class_field_desc -> class_field_desc * 'res = fun ctx x -> match x with | Pcf_inherit (a, b, c) -> @@ -9805,8 +9810,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ( Pcf_extension (Stdlib.fst a), self#constr ctx "Pcf_extension" [ Stdlib.snd a ] ) - method class_field_kind - : 'ctx -> class_field_kind -> class_field_kind * 'res = + method class_field_kind : + 'ctx -> class_field_kind -> class_field_kind * 'res = fun ctx x -> match x with | Cfk_virtual a -> @@ -9819,8 +9824,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ( Cfk_concrete (Stdlib.fst a, Stdlib.fst b), self#constr ctx "Cfk_concrete" [ Stdlib.snd a; Stdlib.snd b ] ) - method class_declaration - : 'ctx -> class_declaration -> class_declaration * 'res = + method class_declaration : + 'ctx -> class_declaration -> class_declaration * 'res = self#class_infos self#class_expr method module_type : 'ctx -> module_type -> module_type * 'res = @@ -9840,8 +9845,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pmty_attributes", Stdlib.snd pmty_attributes); ] ) - method module_type_desc - : 'ctx -> module_type_desc -> module_type_desc * 'res = + method module_type_desc : + 'ctx -> module_type_desc -> module_type_desc * 'res = fun ctx x -> match x with | Pmty_ident a -> @@ -9875,8 +9880,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ( Pmty_alias (Stdlib.fst a), self#constr ctx "Pmty_alias" [ Stdlib.snd a ] ) - method functor_parameter - : 'ctx -> functor_parameter -> functor_parameter * 'res = + method functor_parameter : + 'ctx -> functor_parameter -> functor_parameter * 'res = fun ctx x -> match x with | Unit -> (Unit, self#constr ctx "Unit" []) @@ -9900,8 +9905,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("psig_loc", Stdlib.snd psig_loc); ] ) - method signature_item_desc - : 'ctx -> signature_item_desc -> signature_item_desc * 'res = + method signature_item_desc : + 'ctx -> signature_item_desc -> signature_item_desc * 'res = fun ctx x -> match x with | Psig_value a -> @@ -9971,8 +9976,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ( Psig_extension (Stdlib.fst a, Stdlib.fst b), self#constr ctx "Psig_extension" [ Stdlib.snd a; Stdlib.snd b ] ) - method module_declaration - : 'ctx -> module_declaration -> module_declaration * 'res = + method module_declaration : + 'ctx -> module_declaration -> module_declaration * 'res = fun ctx { pmd_name; pmd_type; pmd_attributes; pmd_loc } -> let pmd_name = self#loc (self#option self#string) ctx pmd_name in let pmd_type = self#module_type ctx pmd_type in @@ -9992,8 +9997,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pmd_loc", Stdlib.snd pmd_loc); ] ) - method module_substitution - : 'ctx -> module_substitution -> module_substitution * 'res = + method module_substitution : + 'ctx -> module_substitution -> module_substitution * 'res = fun ctx { pms_name; pms_manifest; pms_attributes; pms_loc } -> let pms_name = self#loc self#string ctx pms_name in let pms_manifest = self#longident_loc ctx pms_manifest in @@ -10013,8 +10018,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pms_loc", Stdlib.snd pms_loc); ] ) - method module_type_declaration - : 'ctx -> module_type_declaration -> module_type_declaration * 'res = + method module_type_declaration : + 'ctx -> module_type_declaration -> module_type_declaration * 'res = fun ctx { pmtd_name; pmtd_type; pmtd_attributes; pmtd_loc } -> let pmtd_name = self#loc self#string ctx pmtd_name in let pmtd_type = self#option self#module_type ctx pmtd_type in @@ -10034,12 +10039,12 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pmtd_loc", Stdlib.snd pmtd_loc); ] ) - method open_infos - : 'a. - ('ctx -> 'a -> 'a * 'res) -> - 'ctx -> - 'a open_infos -> - 'a open_infos * 'res = + method open_infos : + 'a. + ('ctx -> 'a -> 'a * 'res) -> + 'ctx -> + 'a open_infos -> + 'a open_infos * 'res = fun _a ctx { popen_expr; popen_override; popen_loc; popen_attributes } -> let popen_expr = _a ctx popen_expr in let popen_override = self#override_flag ctx popen_override in @@ -10059,20 +10064,20 @@ class virtual ['ctx, 'res] lift_map_with_context = ("popen_attributes", Stdlib.snd popen_attributes); ] ) - method open_description - : 'ctx -> open_description -> open_description * 'res = + method open_description : + 'ctx -> open_description -> open_description * 'res = self#open_infos self#longident_loc - method open_declaration - : 'ctx -> open_declaration -> open_declaration * 'res = + method open_declaration : + 'ctx -> open_declaration -> open_declaration * 'res = self#open_infos self#module_expr - method include_infos - : 'a. - ('ctx -> 'a -> 'a * 'res) -> - 'ctx -> - 'a include_infos -> - 'a include_infos * 'res = + method include_infos : + 'a. + ('ctx -> 'a -> 'a * 'res) -> + 'ctx -> + 'a include_infos -> + 'a include_infos * 'res = fun _a ctx { pincl_mod; pincl_loc; pincl_attributes } -> let pincl_mod = _a ctx pincl_mod in let pincl_loc = self#location ctx pincl_loc in @@ -10089,12 +10094,12 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pincl_attributes", Stdlib.snd pincl_attributes); ] ) - method include_description - : 'ctx -> include_description -> include_description * 'res = + method include_description : + 'ctx -> include_description -> include_description * 'res = self#include_infos self#module_type - method include_declaration - : 'ctx -> include_declaration -> include_declaration * 'res = + method include_declaration : + 'ctx -> include_declaration -> include_declaration * 'res = self#include_infos self#module_expr method with_constraint : 'ctx -> with_constraint -> with_constraint * 'res = @@ -10150,8 +10155,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pmod_attributes", Stdlib.snd pmod_attributes); ] ) - method module_expr_desc - : 'ctx -> module_expr_desc -> module_expr_desc * 'res = + method module_expr_desc : + 'ctx -> module_expr_desc -> module_expr_desc * 'res = fun ctx x -> match x with | Pmod_ident a -> @@ -10201,8 +10206,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pstr_loc", Stdlib.snd pstr_loc); ] ) - method structure_item_desc - : 'ctx -> structure_item_desc -> structure_item_desc * 'res = + method structure_item_desc : + 'ctx -> structure_item_desc -> structure_item_desc * 'res = fun ctx x -> match x with | Pstr_eval (a, b) -> @@ -10322,8 +10327,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ( Ptop_dir (Stdlib.fst a), self#constr ctx "Ptop_dir" [ Stdlib.snd a ] ) - method toplevel_directive - : 'ctx -> toplevel_directive -> toplevel_directive * 'res = + method toplevel_directive : + 'ctx -> toplevel_directive -> toplevel_directive * 'res = fun ctx { pdir_name; pdir_arg; pdir_loc } -> let pdir_name = self#loc self#string ctx pdir_name in let pdir_arg = self#option self#directive_argument ctx pdir_arg in @@ -10340,8 +10345,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pdir_loc", Stdlib.snd pdir_loc); ] ) - method directive_argument - : 'ctx -> directive_argument -> directive_argument * 'res = + method directive_argument : + 'ctx -> directive_argument -> directive_argument * 'res = fun ctx { pdira_desc; pdira_loc } -> let pdira_desc = self#directive_argument_desc ctx pdira_desc in let pdira_loc = self#location ctx pdira_loc in @@ -10355,8 +10360,8 @@ class virtual ['ctx, 'res] lift_map_with_context = ("pdira_loc", Stdlib.snd pdira_loc); ] ) - method directive_argument_desc - : 'ctx -> directive_argument_desc -> directive_argument_desc * 'res = + method directive_argument_desc : + 'ctx -> directive_argument_desc -> directive_argument_desc * 'res = fun ctx x -> match x with | Pdir_string a -> diff --git a/astlib/migrate_402_403.ml b/astlib/migrate_402_403.ml index fdb2fc6fe..d64e7bb35 100644 --- a/astlib/migrate_402_403.ml +++ b/astlib/migrate_402_403.ml @@ -682,10 +682,10 @@ and copy_extension : From.Parsetree.extension -> To.Parsetree.extension = (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.class_infos -> - 'g0 To.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos = fun f0 { From.Parsetree.pci_virt; @@ -719,10 +719,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.include_infos -> - 'g0 To.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos = fun f0 { From.Parsetree.pincl_mod; @@ -983,7 +983,7 @@ and copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option = and copy_longident : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = + 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = fun f0 { From.Asttypes.txt; From.Asttypes.loc } -> { To.Asttypes.txt = f0 txt; To.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_403_402.ml b/astlib/migrate_403_402.ml index b33c9c63a..4966a4143 100644 --- a/astlib/migrate_403_402.ml +++ b/astlib/migrate_403_402.ml @@ -692,10 +692,10 @@ and copy_extension : From.Parsetree.extension -> To.Parsetree.extension = (copy_loc (fun x -> x) x0, copy_payload (from_loc x0) x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.class_infos -> - 'g0 To.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos = fun f0 { From.Parsetree.pci_virt; @@ -729,10 +729,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.include_infos -> - 'g0 To.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos = fun f0 { From.Parsetree.pincl_mod; @@ -998,7 +998,7 @@ and copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option = and copy_longident : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = + 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = fun f0 { From.Asttypes.txt; From.Asttypes.loc } -> { To.Asttypes.txt = f0 txt; To.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_403_404.ml b/astlib/migrate_403_404.ml index ef12d2921..b5193d25a 100644 --- a/astlib/migrate_403_404.ml +++ b/astlib/migrate_403_404.ml @@ -668,10 +668,10 @@ and copy_extension : From.Parsetree.extension -> To.Parsetree.extension = (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.class_infos -> - 'g0 To.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos = fun f0 { From.Parsetree.pci_virt; @@ -705,10 +705,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.include_infos -> - 'g0 To.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos = fun f0 { From.Parsetree.pincl_mod; @@ -967,7 +967,7 @@ and copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option = and copy_longident : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = + 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = fun f0 { From.Asttypes.txt; From.Asttypes.loc } -> { To.Asttypes.txt = f0 txt; To.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_404_403.ml b/astlib/migrate_404_403.ml index 00dd85c9e..5eaabb50d 100644 --- a/astlib/migrate_404_403.ml +++ b/astlib/migrate_404_403.ml @@ -676,10 +676,10 @@ and copy_extension : From.Parsetree.extension -> To.Parsetree.extension = (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.class_infos -> - 'g0 To.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos = fun f0 { From.Parsetree.pci_virt; @@ -713,10 +713,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.include_infos -> - 'g0 To.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos = fun f0 { From.Parsetree.pincl_mod; @@ -975,7 +975,7 @@ and copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option = and copy_longident : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = + 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = fun f0 { From.Asttypes.txt; From.Asttypes.loc } -> { To.Asttypes.txt = f0 txt; To.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_404_405.ml b/astlib/migrate_404_405.ml index bf13814ac..f73970b54 100644 --- a/astlib/migrate_404_405.ml +++ b/astlib/migrate_404_405.ml @@ -683,10 +683,10 @@ and copy_extension : From.Parsetree.extension -> To.Parsetree.extension = (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.class_infos -> - 'g0 To.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos = fun f0 { From.Parsetree.pci_virt; @@ -720,10 +720,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.include_infos -> - 'g0 To.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos = fun f0 { From.Parsetree.pincl_mod; @@ -982,7 +982,7 @@ and copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option = and copy_longident : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = + 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = fun f0 { From.Asttypes.txt; From.Asttypes.loc } -> { To.Asttypes.txt = f0 txt; To.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_405_404.ml b/astlib/migrate_405_404.ml index 9246d09de..87a80a80e 100644 --- a/astlib/migrate_405_404.ml +++ b/astlib/migrate_405_404.ml @@ -682,10 +682,10 @@ and copy_extension : From.Parsetree.extension -> To.Parsetree.extension = (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.class_infos -> - 'g0 To.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos = fun f0 { From.Parsetree.pci_virt; @@ -719,10 +719,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.include_infos -> - 'g0 To.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos = fun f0 { From.Parsetree.pincl_mod; @@ -981,7 +981,7 @@ and copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option = and copy_longident : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = + 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = fun f0 { From.Asttypes.txt; From.Asttypes.loc } -> { To.Asttypes.txt = f0 txt; To.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_405_406.ml b/astlib/migrate_405_406.ml index 12e7abd66..df4ba0e23 100644 --- a/astlib/migrate_405_406.ml +++ b/astlib/migrate_405_406.ml @@ -685,10 +685,10 @@ and copy_extension : From.Parsetree.extension -> To.Parsetree.extension = (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.class_infos -> - 'g0 To.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos = fun f0 { From.Parsetree.pci_virt; @@ -722,10 +722,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.include_infos -> - 'g0 To.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos = fun f0 { From.Parsetree.pincl_mod; @@ -984,7 +984,7 @@ and copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option = and copy_longident : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = + 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = fun f0 { From.Asttypes.txt; From.Asttypes.loc } -> { To.Asttypes.txt = f0 txt; To.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_406_405.ml b/astlib/migrate_406_405.ml index aa5038f36..4ec75b1d3 100644 --- a/astlib/migrate_406_405.ml +++ b/astlib/migrate_406_405.ml @@ -697,10 +697,10 @@ and copy_extension : From.Parsetree.extension -> To.Parsetree.extension = (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.class_infos -> - 'g0 To.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos = fun f0 { From.Parsetree.pci_virt; @@ -734,10 +734,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.include_infos -> - 'g0 To.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos = fun f0 { From.Parsetree.pincl_mod; @@ -996,7 +996,7 @@ and copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option = and copy_longident : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = + 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = fun f0 { From.Asttypes.txt; From.Asttypes.loc } -> { To.Asttypes.txt = f0 txt; To.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_406_407.ml b/astlib/migrate_406_407.ml index 3685caa9d..49c01e143 100644 --- a/astlib/migrate_406_407.ml +++ b/astlib/migrate_406_407.ml @@ -693,10 +693,10 @@ and copy_extension : From.Parsetree.extension -> To.Parsetree.extension = (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.class_infos -> - 'g0 To.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos = fun f0 { From.Parsetree.pci_virt; @@ -730,10 +730,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.include_infos -> - 'g0 To.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos = fun f0 { From.Parsetree.pincl_mod; @@ -992,7 +992,7 @@ and copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option = and copy_longident : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = + 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = fun f0 { From.Asttypes.txt; From.Asttypes.loc } -> { To.Asttypes.txt = f0 txt; To.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_407_406.ml b/astlib/migrate_407_406.ml index 5d264cc4a..21584152b 100644 --- a/astlib/migrate_407_406.ml +++ b/astlib/migrate_407_406.ml @@ -693,10 +693,10 @@ and copy_extension : From.Parsetree.extension -> To.Parsetree.extension = (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.class_infos -> - 'g0 To.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos = fun f0 { From.Parsetree.pci_virt; @@ -730,10 +730,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.include_infos -> - 'g0 To.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos = fun f0 { From.Parsetree.pincl_mod; @@ -992,7 +992,7 @@ and copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option = and copy_longident : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = + 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = fun f0 { From.Asttypes.txt; From.Asttypes.loc } -> { To.Asttypes.txt = f0 txt; To.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_407_408.ml b/astlib/migrate_407_408.ml index 7ce7aa1b5..5d28cb122 100644 --- a/astlib/migrate_407_408.ml +++ b/astlib/migrate_407_408.ml @@ -814,10 +814,10 @@ and copy_extension : From.Parsetree.extension -> To.Parsetree.extension = (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.class_infos -> - 'g0 To.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos = fun f0 { From.Parsetree.pci_virt; @@ -851,10 +851,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.include_infos -> - 'g0 To.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos = fun f0 { From.Parsetree.pincl_mod; @@ -1114,7 +1114,7 @@ and copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option = and copy_longident : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = + 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = fun f0 { From.Asttypes.txt; From.Asttypes.loc } -> { To.Asttypes.txt = f0 txt; To.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_408_407.ml b/astlib/migrate_408_407.ml index c65f56d8c..653981318 100644 --- a/astlib/migrate_408_407.ml +++ b/astlib/migrate_408_407.ml @@ -782,10 +782,10 @@ and copy_extension : From.Parsetree.extension -> To.Parsetree.extension = (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.class_infos -> - 'g0 To.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.class_infos -> + 'g0 To.Parsetree.class_infos = fun f0 { From.Parsetree.pci_virt; @@ -819,10 +819,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 From.Parsetree.include_infos -> - 'g0 To.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 From.Parsetree.include_infos -> + 'g0 To.Parsetree.include_infos = fun f0 { From.Parsetree.pincl_mod; @@ -1096,7 +1096,7 @@ and copy_option : 'f0 'g0. ('f0 -> 'g0) -> 'f0 option -> 'g0 option = and copy_longident : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = + 'f0 'g0. ('f0 -> 'g0) -> 'f0 From.Asttypes.loc -> 'g0 To.Asttypes.loc = fun f0 { From.Asttypes.txt; From.Asttypes.loc } -> { To.Asttypes.txt = f0 txt; To.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_408_409.ml b/astlib/migrate_408_409.ml index ae3922a60..754910f3a 100644 --- a/astlib/migrate_408_409.ml +++ b/astlib/migrate_408_409.ml @@ -826,10 +826,10 @@ and copy_extension : Ast_408.Parsetree.extension -> Ast_409.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_408.Parsetree.class_infos -> - 'g0 Ast_409.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_408.Parsetree.class_infos -> + 'g0 Ast_409.Parsetree.class_infos = fun f0 { Ast_408.Parsetree.pci_virt; @@ -864,10 +864,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_408.Parsetree.include_infos -> - 'g0 Ast_409.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_408.Parsetree.include_infos -> + 'g0 Ast_409.Parsetree.include_infos = fun f0 { Ast_408.Parsetree.pincl_mod; @@ -885,10 +885,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_408.Parsetree.open_infos -> - 'g0 Ast_409.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_408.Parsetree.open_infos -> + 'g0 Ast_409.Parsetree.open_infos = fun f0 { Ast_408.Parsetree.popen_expr; @@ -1177,8 +1177,8 @@ and copy_constant : Ast_408.Parsetree.constant -> Ast_409.Parsetree.constant = and copy_Longident_t : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_408.Asttypes.loc -> 'g0 Ast_409.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_408.Asttypes.loc -> 'g0 Ast_409.Asttypes.loc = fun f0 { Ast_408.Asttypes.txt; Ast_408.Asttypes.loc } -> { Ast_409.Asttypes.txt = f0 txt; Ast_409.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_409_408.ml b/astlib/migrate_409_408.ml index f0a6ecff7..bc9ab219a 100644 --- a/astlib/migrate_409_408.ml +++ b/astlib/migrate_409_408.ml @@ -826,10 +826,10 @@ and copy_extension : Ast_409.Parsetree.extension -> Ast_408.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_409.Parsetree.class_infos -> - 'g0 Ast_408.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_409.Parsetree.class_infos -> + 'g0 Ast_408.Parsetree.class_infos = fun f0 { Ast_409.Parsetree.pci_virt; @@ -864,10 +864,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_409.Parsetree.include_infos -> - 'g0 Ast_408.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_409.Parsetree.include_infos -> + 'g0 Ast_408.Parsetree.include_infos = fun f0 { Ast_409.Parsetree.pincl_mod; @@ -885,10 +885,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_409.Parsetree.open_infos -> - 'g0 Ast_408.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_409.Parsetree.open_infos -> + 'g0 Ast_408.Parsetree.open_infos = fun f0 { Ast_409.Parsetree.popen_expr; @@ -1177,8 +1177,8 @@ and copy_constant : Ast_409.Parsetree.constant -> Ast_408.Parsetree.constant = and copy_Longident_t : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_409.Asttypes.loc -> 'g0 Ast_408.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_409.Asttypes.loc -> 'g0 Ast_408.Asttypes.loc = fun f0 { Ast_409.Asttypes.txt; Ast_409.Asttypes.loc } -> { Ast_408.Asttypes.txt = f0 txt; Ast_408.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_409_410.ml b/astlib/migrate_409_410.ml index 1585588a3..af4b7308f 100644 --- a/astlib/migrate_409_410.ml +++ b/astlib/migrate_409_410.ml @@ -828,10 +828,10 @@ and copy_extension : Ast_409.Parsetree.extension -> Ast_410.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_409.Parsetree.class_infos -> - 'g0 Ast_410.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_409.Parsetree.class_infos -> + 'g0 Ast_410.Parsetree.class_infos = fun f0 { Ast_409.Parsetree.pci_virt; @@ -866,10 +866,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_409.Parsetree.include_infos -> - 'g0 Ast_410.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_409.Parsetree.include_infos -> + 'g0 Ast_410.Parsetree.include_infos = fun f0 { Ast_409.Parsetree.pincl_mod; @@ -887,10 +887,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_409.Parsetree.open_infos -> - 'g0 Ast_410.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_409.Parsetree.open_infos -> + 'g0 Ast_410.Parsetree.open_infos = fun f0 { Ast_409.Parsetree.popen_expr; @@ -1179,8 +1179,8 @@ and copy_constant : Ast_409.Parsetree.constant -> Ast_410.Parsetree.constant = and copy_Longident_t : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_409.Asttypes.loc -> 'g0 Ast_410.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_409.Asttypes.loc -> 'g0 Ast_410.Asttypes.loc = fun f0 { Ast_409.Asttypes.txt; Ast_409.Asttypes.loc } -> { Ast_410.Asttypes.txt = f0 txt; Ast_410.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_410_409.ml b/astlib/migrate_410_409.ml index 0cc88074e..d1298e0c6 100644 --- a/astlib/migrate_410_409.ml +++ b/astlib/migrate_410_409.ml @@ -845,10 +845,10 @@ and copy_extension : Ast_410.Parsetree.extension -> Ast_409.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_410.Parsetree.class_infos -> - 'g0 Ast_409.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_410.Parsetree.class_infos -> + 'g0 Ast_409.Parsetree.class_infos = fun f0 { Ast_410.Parsetree.pci_virt; @@ -883,10 +883,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_410.Parsetree.include_infos -> - 'g0 Ast_409.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_410.Parsetree.include_infos -> + 'g0 Ast_409.Parsetree.include_infos = fun f0 { Ast_410.Parsetree.pincl_mod; @@ -904,10 +904,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_410.Parsetree.open_infos -> - 'g0 Ast_409.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_410.Parsetree.open_infos -> + 'g0 Ast_409.Parsetree.open_infos = fun f0 { Ast_410.Parsetree.popen_expr; @@ -1201,8 +1201,8 @@ and copy_constant : Ast_410.Parsetree.constant -> Ast_409.Parsetree.constant = and copy_Longident_t : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_410.Asttypes.loc -> 'g0 Ast_409.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_410.Asttypes.loc -> 'g0 Ast_409.Asttypes.loc = fun f0 { Ast_410.Asttypes.txt; Ast_410.Asttypes.loc } -> { Ast_409.Asttypes.txt = f0 txt; Ast_409.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_410_411.ml b/astlib/migrate_410_411.ml index 4370fadb6..be4d78e46 100644 --- a/astlib/migrate_410_411.ml +++ b/astlib/migrate_410_411.ml @@ -835,10 +835,10 @@ and copy_extension : Ast_410.Parsetree.extension -> Ast_411.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_410.Parsetree.class_infos -> - 'g0 Ast_411.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_410.Parsetree.class_infos -> + 'g0 Ast_411.Parsetree.class_infos = fun f0 { Ast_410.Parsetree.pci_virt; @@ -873,10 +873,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_410.Parsetree.include_infos -> - 'g0 Ast_411.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_410.Parsetree.include_infos -> + 'g0 Ast_411.Parsetree.include_infos = fun f0 { Ast_410.Parsetree.pincl_mod; @@ -894,10 +894,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_410.Parsetree.open_infos -> - 'g0 Ast_411.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_410.Parsetree.open_infos -> + 'g0 Ast_411.Parsetree.open_infos = fun f0 { Ast_410.Parsetree.popen_expr; @@ -1188,8 +1188,8 @@ and copy_constant : Ast_410.Parsetree.constant -> Ast_411.Parsetree.constant = and copy_Longident_t : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_410.Asttypes.loc -> 'g0 Ast_411.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_410.Asttypes.loc -> 'g0 Ast_411.Asttypes.loc = fun f0 { Ast_410.Asttypes.txt; Ast_410.Asttypes.loc } -> { Ast_411.Asttypes.txt = f0 txt; Ast_411.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_411_410.ml b/astlib/migrate_411_410.ml index 16c8cbd2e..ad1def34a 100644 --- a/astlib/migrate_411_410.ml +++ b/astlib/migrate_411_410.ml @@ -835,10 +835,10 @@ and copy_extension : Ast_411.Parsetree.extension -> Ast_410.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_411.Parsetree.class_infos -> - 'g0 Ast_410.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_411.Parsetree.class_infos -> + 'g0 Ast_410.Parsetree.class_infos = fun f0 { Ast_411.Parsetree.pci_virt; @@ -873,10 +873,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_411.Parsetree.include_infos -> - 'g0 Ast_410.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_411.Parsetree.include_infos -> + 'g0 Ast_410.Parsetree.include_infos = fun f0 { Ast_411.Parsetree.pincl_mod; @@ -894,10 +894,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_411.Parsetree.open_infos -> - 'g0 Ast_410.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_411.Parsetree.open_infos -> + 'g0 Ast_410.Parsetree.open_infos = fun f0 { Ast_411.Parsetree.popen_expr; @@ -1187,8 +1187,8 @@ and copy_constant : Ast_411.Parsetree.constant -> Ast_410.Parsetree.constant = and copy_Longident_t : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_411.Asttypes.loc -> 'g0 Ast_410.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_411.Asttypes.loc -> 'g0 Ast_410.Asttypes.loc = fun f0 { Ast_411.Asttypes.txt; Ast_411.Asttypes.loc } -> { Ast_410.Asttypes.txt = f0 txt; Ast_410.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_411_412.ml b/astlib/migrate_411_412.ml index ee064e137..7861486e6 100644 --- a/astlib/migrate_411_412.ml +++ b/astlib/migrate_411_412.ml @@ -826,10 +826,10 @@ and copy_extension : Ast_411.Parsetree.extension -> Ast_412.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_411.Parsetree.class_infos -> - 'g0 Ast_412.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_411.Parsetree.class_infos -> + 'g0 Ast_412.Parsetree.class_infos = fun f0 { Ast_411.Parsetree.pci_virt; @@ -864,10 +864,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_411.Parsetree.include_infos -> - 'g0 Ast_412.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_411.Parsetree.include_infos -> + 'g0 Ast_412.Parsetree.include_infos = fun f0 { Ast_411.Parsetree.pincl_mod; @@ -885,10 +885,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_411.Parsetree.open_infos -> - 'g0 Ast_412.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_411.Parsetree.open_infos -> + 'g0 Ast_412.Parsetree.open_infos = fun f0 { Ast_411.Parsetree.popen_expr; @@ -1179,8 +1179,8 @@ and copy_constant : Ast_411.Parsetree.constant -> Ast_412.Parsetree.constant = and copy_Longident_t : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_411.Asttypes.loc -> 'g0 Ast_412.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_411.Asttypes.loc -> 'g0 Ast_412.Asttypes.loc = fun f0 { Ast_411.Asttypes.txt; Ast_411.Asttypes.loc } -> { Ast_412.Asttypes.txt = f0 txt; Ast_412.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_412_411.ml b/astlib/migrate_412_411.ml index 7a175a074..8d423c7f6 100644 --- a/astlib/migrate_412_411.ml +++ b/astlib/migrate_412_411.ml @@ -826,10 +826,10 @@ and copy_extension : Ast_412.Parsetree.extension -> Ast_411.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_412.Parsetree.class_infos -> - 'g0 Ast_411.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_412.Parsetree.class_infos -> + 'g0 Ast_411.Parsetree.class_infos = fun f0 { Ast_412.Parsetree.pci_virt; @@ -866,10 +866,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_412.Parsetree.include_infos -> - 'g0 Ast_411.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_412.Parsetree.include_infos -> + 'g0 Ast_411.Parsetree.include_infos = fun f0 { Ast_412.Parsetree.pincl_mod; @@ -887,10 +887,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_412.Parsetree.open_infos -> - 'g0 Ast_411.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_412.Parsetree.open_infos -> + 'g0 Ast_411.Parsetree.open_infos = fun f0 { Ast_412.Parsetree.popen_expr; @@ -1185,8 +1185,8 @@ and copy_constant : Ast_412.Parsetree.constant -> Ast_411.Parsetree.constant = and copy_Longident_t : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_412.Asttypes.loc -> 'g0 Ast_411.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_412.Asttypes.loc -> 'g0 Ast_411.Asttypes.loc = fun f0 { Ast_412.Asttypes.txt; Ast_412.Asttypes.loc } -> { Ast_411.Asttypes.txt = f0 txt; Ast_411.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_412_413.ml b/astlib/migrate_412_413.ml index 164fd3ce7..26c15e8f2 100644 --- a/astlib/migrate_412_413.ml +++ b/astlib/migrate_412_413.ml @@ -827,10 +827,10 @@ and copy_extension : Ast_412.Parsetree.extension -> Ast_413.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_412.Parsetree.class_infos -> - 'g0 Ast_413.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_412.Parsetree.class_infos -> + 'g0 Ast_413.Parsetree.class_infos = fun f0 { Ast_412.Parsetree.pci_virt; @@ -867,10 +867,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_412.Parsetree.include_infos -> - 'g0 Ast_413.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_412.Parsetree.include_infos -> + 'g0 Ast_413.Parsetree.include_infos = fun f0 { Ast_412.Parsetree.pincl_mod; @@ -888,10 +888,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_412.Parsetree.open_infos -> - 'g0 Ast_413.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_412.Parsetree.open_infos -> + 'g0 Ast_413.Parsetree.open_infos = fun f0 { Ast_412.Parsetree.popen_expr; @@ -1191,8 +1191,8 @@ and copy_constant : Ast_412.Parsetree.constant -> Ast_413.Parsetree.constant = and copy_Longident_t : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_412.Asttypes.loc -> 'g0 Ast_413.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_412.Asttypes.loc -> 'g0 Ast_413.Asttypes.loc = fun f0 { Ast_412.Asttypes.txt; Ast_412.Asttypes.loc } -> { Ast_413.Asttypes.txt = f0 txt; Ast_413.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_413_412.ml b/astlib/migrate_413_412.ml index 812781969..350882ac6 100644 --- a/astlib/migrate_413_412.ml +++ b/astlib/migrate_413_412.ml @@ -848,10 +848,10 @@ and copy_extension : Ast_413.Parsetree.extension -> Ast_412.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_413.Parsetree.class_infos -> - 'g0 Ast_412.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_413.Parsetree.class_infos -> + 'g0 Ast_412.Parsetree.class_infos = fun f0 { Ast_413.Parsetree.pci_virt; @@ -888,10 +888,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_413.Parsetree.include_infos -> - 'g0 Ast_412.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_413.Parsetree.include_infos -> + 'g0 Ast_412.Parsetree.include_infos = fun f0 { Ast_413.Parsetree.pincl_mod; @@ -909,10 +909,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_413.Parsetree.open_infos -> - 'g0 Ast_412.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_413.Parsetree.open_infos -> + 'g0 Ast_412.Parsetree.open_infos = fun f0 { Ast_413.Parsetree.popen_expr; @@ -1212,8 +1212,8 @@ and copy_constant : Ast_413.Parsetree.constant -> Ast_412.Parsetree.constant = and copy_Longident_t : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_413.Asttypes.loc -> 'g0 Ast_412.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_413.Asttypes.loc -> 'g0 Ast_412.Asttypes.loc = fun f0 { Ast_413.Asttypes.txt; Ast_413.Asttypes.loc } -> { Ast_412.Asttypes.txt = f0 txt; Ast_412.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_413_414.ml b/astlib/migrate_413_414.ml index ecab5ab52..7a9fe7f2a 100644 --- a/astlib/migrate_413_414.ml +++ b/astlib/migrate_413_414.ml @@ -839,10 +839,10 @@ and copy_extension : Ast_413.Parsetree.extension -> Ast_414.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_413.Parsetree.class_infos -> - 'g0 Ast_414.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_413.Parsetree.class_infos -> + 'g0 Ast_414.Parsetree.class_infos = fun f0 { Ast_413.Parsetree.pci_virt; @@ -879,10 +879,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_413.Parsetree.include_infos -> - 'g0 Ast_414.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_413.Parsetree.include_infos -> + 'g0 Ast_414.Parsetree.include_infos = fun f0 { Ast_413.Parsetree.pincl_mod; @@ -900,10 +900,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_413.Parsetree.open_infos -> - 'g0 Ast_414.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_413.Parsetree.open_infos -> + 'g0 Ast_414.Parsetree.open_infos = fun f0 { Ast_413.Parsetree.popen_expr; @@ -1204,8 +1204,8 @@ and copy_constant : Ast_413.Parsetree.constant -> Ast_414.Parsetree.constant = and copy_Longident_t : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_413.Asttypes.loc -> 'g0 Ast_414.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_413.Asttypes.loc -> 'g0 Ast_414.Asttypes.loc = fun f0 { Ast_413.Asttypes.txt; Ast_413.Asttypes.loc } -> { Ast_414.Asttypes.txt = f0 txt; Ast_414.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_414_413.ml b/astlib/migrate_414_413.ml index e70190d88..90c268ba9 100644 --- a/astlib/migrate_414_413.ml +++ b/astlib/migrate_414_413.ml @@ -843,10 +843,10 @@ and copy_extension : Ast_414.Parsetree.extension -> Ast_413.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_414.Parsetree.class_infos -> - 'g0 Ast_413.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_414.Parsetree.class_infos -> + 'g0 Ast_413.Parsetree.class_infos = fun f0 { Ast_414.Parsetree.pci_virt; @@ -883,10 +883,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_414.Parsetree.include_infos -> - 'g0 Ast_413.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_414.Parsetree.include_infos -> + 'g0 Ast_413.Parsetree.include_infos = fun f0 { Ast_414.Parsetree.pincl_mod; @@ -904,10 +904,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_414.Parsetree.open_infos -> - 'g0 Ast_413.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_414.Parsetree.open_infos -> + 'g0 Ast_413.Parsetree.open_infos = fun f0 { Ast_414.Parsetree.popen_expr; @@ -1215,8 +1215,8 @@ and copy_constant : Ast_414.Parsetree.constant -> Ast_413.Parsetree.constant = and copy_Longident_t : Longident.t -> Longident.t = fun x -> x and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_414.Asttypes.loc -> 'g0 Ast_413.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_414.Asttypes.loc -> 'g0 Ast_413.Asttypes.loc = fun f0 { Ast_414.Asttypes.txt; Ast_414.Asttypes.loc } -> { Ast_413.Asttypes.txt = f0 txt; Ast_413.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_500_501.ml b/astlib/migrate_500_501.ml index c3cd1499e..c7d41dbc3 100644 --- a/astlib/migrate_500_501.ml +++ b/astlib/migrate_500_501.ml @@ -987,10 +987,10 @@ and copy_extension : Ast_500.Parsetree.extension -> Ast_501.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_500.Parsetree.class_infos -> - 'g0 Ast_501.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_500.Parsetree.class_infos -> + 'g0 Ast_501.Parsetree.class_infos = fun f0 { Ast_500.Parsetree.pci_virt; @@ -1027,10 +1027,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_500.Parsetree.include_infos -> - 'g0 Ast_501.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_500.Parsetree.include_infos -> + 'g0 Ast_501.Parsetree.include_infos = fun f0 { Ast_500.Parsetree.pincl_mod; @@ -1048,10 +1048,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_500.Parsetree.open_infos -> - 'g0 Ast_501.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_500.Parsetree.open_infos -> + 'g0 Ast_501.Parsetree.open_infos = fun f0 { Ast_500.Parsetree.popen_expr; @@ -1360,8 +1360,8 @@ and copy_Longident_t : Longident.t -> Longident.t = function Longident.Lapply (copy_Longident_t x0, copy_Longident_t x1) and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_500.Asttypes.loc -> 'g0 Ast_501.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_500.Asttypes.loc -> 'g0 Ast_501.Asttypes.loc = fun f0 { Ast_500.Asttypes.txt; Ast_500.Asttypes.loc } -> { Ast_501.Asttypes.txt = f0 txt; Ast_501.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_501_500.ml b/astlib/migrate_501_500.ml index a0a776e1c..4c6f05e1e 100644 --- a/astlib/migrate_501_500.ml +++ b/astlib/migrate_501_500.ml @@ -252,10 +252,10 @@ and copy_value_binding : match (pvb_constraint, pvb_pat) with | ( Some (Pvc_constraint - { - locally_abstract_univars = []; - typ = { ptyp_desc = Ptyp_poly _; _ } as typ; - }), + { + locally_abstract_univars = []; + typ = { ptyp_desc = Ptyp_poly _; _ } as typ; + }), { Ast_500.Parsetree.ppat_desc = Ppat_var _; ppat_attributes = [] } ) -> (* the sugaring of [let x: univars . typ = exp ] was desugared to [let (x:univars . typ) = exp] in 5.0 which doesn't fit the case below *) @@ -1031,10 +1031,10 @@ and copy_extension : Ast_501.Parsetree.extension -> Ast_500.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_501.Parsetree.class_infos -> - 'g0 Ast_500.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_501.Parsetree.class_infos -> + 'g0 Ast_500.Parsetree.class_infos = fun f0 { Ast_501.Parsetree.pci_virt; @@ -1071,10 +1071,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_501.Parsetree.include_infos -> - 'g0 Ast_500.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_501.Parsetree.include_infos -> + 'g0 Ast_500.Parsetree.include_infos = fun f0 { Ast_501.Parsetree.pincl_mod; @@ -1092,10 +1092,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_501.Parsetree.open_infos -> - 'g0 Ast_500.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_501.Parsetree.open_infos -> + 'g0 Ast_500.Parsetree.open_infos = fun f0 { Ast_501.Parsetree.popen_expr; @@ -1404,8 +1404,8 @@ and copy_Longident_t : Longident.t -> Longident.t = function Longident.Lapply (copy_Longident_t x0, copy_Longident_t x1) and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_501.Asttypes.loc -> 'g0 Ast_500.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_501.Asttypes.loc -> 'g0 Ast_500.Asttypes.loc = fun f0 { Ast_501.Asttypes.txt; Ast_501.Asttypes.loc } -> { Ast_500.Asttypes.txt = f0 txt; Ast_500.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_501_502.ml b/astlib/migrate_501_502.ml index dbca4fdb9..102118c05 100644 --- a/astlib/migrate_501_502.ml +++ b/astlib/migrate_501_502.ml @@ -997,10 +997,10 @@ and copy_extension : Ast_501.Parsetree.extension -> Ast_502.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_501.Parsetree.class_infos -> - 'g0 Ast_502.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_501.Parsetree.class_infos -> + 'g0 Ast_502.Parsetree.class_infos = fun f0 { Ast_501.Parsetree.pci_virt; @@ -1037,10 +1037,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_501.Parsetree.include_infos -> - 'g0 Ast_502.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_501.Parsetree.include_infos -> + 'g0 Ast_502.Parsetree.include_infos = fun f0 { Ast_501.Parsetree.pincl_mod; @@ -1058,10 +1058,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_501.Parsetree.open_infos -> - 'g0 Ast_502.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_501.Parsetree.open_infos -> + 'g0 Ast_502.Parsetree.open_infos = fun f0 { Ast_501.Parsetree.popen_expr; @@ -1370,8 +1370,8 @@ and copy_Longident_t : Longident.t -> Longident.t = function Longident.Lapply (copy_Longident_t x0, copy_Longident_t x1) and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_501.Asttypes.loc -> 'g0 Ast_502.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_501.Asttypes.loc -> 'g0 Ast_502.Asttypes.loc = fun f0 { Ast_501.Asttypes.txt; Ast_501.Asttypes.loc } -> { Ast_502.Asttypes.txt = f0 txt; Ast_502.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_502_501.ml b/astlib/migrate_502_501.ml index d7ab4a272..50ae5c76c 100644 --- a/astlib/migrate_502_501.ml +++ b/astlib/migrate_502_501.ml @@ -1023,10 +1023,10 @@ and copy_extension : Ast_502.Parsetree.extension -> Ast_501.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_502.Parsetree.class_infos -> - 'g0 Ast_501.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_502.Parsetree.class_infos -> + 'g0 Ast_501.Parsetree.class_infos = fun f0 { Ast_502.Parsetree.pci_virt; @@ -1063,10 +1063,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_502.Parsetree.include_infos -> - 'g0 Ast_501.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_502.Parsetree.include_infos -> + 'g0 Ast_501.Parsetree.include_infos = fun f0 { Ast_502.Parsetree.pincl_mod; @@ -1084,10 +1084,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_502.Parsetree.open_infos -> - 'g0 Ast_501.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_502.Parsetree.open_infos -> + 'g0 Ast_501.Parsetree.open_infos = fun f0 { Ast_502.Parsetree.popen_expr; @@ -1396,8 +1396,8 @@ and copy_Longident_t : Longident.t -> Longident.t = function Longident.Lapply (copy_Longident_t x0, copy_Longident_t x1) and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_502.Asttypes.loc -> 'g0 Ast_501.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_502.Asttypes.loc -> 'g0 Ast_501.Asttypes.loc = fun f0 { Ast_502.Asttypes.txt; Ast_502.Asttypes.loc } -> { Ast_501.Asttypes.txt = f0 txt; Ast_501.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_502_503.ml b/astlib/migrate_502_503.ml index 3d81a2860..94179a0be 100644 --- a/astlib/migrate_502_503.ml +++ b/astlib/migrate_502_503.ml @@ -895,10 +895,10 @@ and copy_extension : Ast_502.Parsetree.extension -> Ast_503.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_502.Parsetree.class_infos -> - 'g0 Ast_503.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_502.Parsetree.class_infos -> + 'g0 Ast_503.Parsetree.class_infos = fun f0 { Ast_502.Parsetree.pci_virt; @@ -935,10 +935,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_502.Parsetree.include_infos -> - 'g0 Ast_503.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_502.Parsetree.include_infos -> + 'g0 Ast_503.Parsetree.include_infos = fun f0 { Ast_502.Parsetree.pincl_mod; @@ -956,10 +956,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_502.Parsetree.open_infos -> - 'g0 Ast_503.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_502.Parsetree.open_infos -> + 'g0 Ast_503.Parsetree.open_infos = fun f0 { Ast_502.Parsetree.popen_expr; @@ -1272,8 +1272,8 @@ and copy_Longident_t : Longident.t -> Longident.t = function Longident.Lapply (copy_Longident_t x0, copy_Longident_t x1) and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_502.Asttypes.loc -> 'g0 Ast_503.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_502.Asttypes.loc -> 'g0 Ast_503.Asttypes.loc = fun f0 { Ast_502.Asttypes.txt; Ast_502.Asttypes.loc } -> { Ast_503.Asttypes.txt = f0 txt; Ast_503.Asttypes.loc = copy_location loc } diff --git a/astlib/migrate_503_502.ml b/astlib/migrate_503_502.ml index cadc3482b..cf11c888e 100644 --- a/astlib/migrate_503_502.ml +++ b/astlib/migrate_503_502.ml @@ -901,10 +901,10 @@ and copy_extension : Ast_503.Parsetree.extension -> Ast_502.Parsetree.extension (copy_loc (fun x -> x) x0, copy_payload x1) and copy_class_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_503.Parsetree.class_infos -> - 'g0 Ast_502.Parsetree.class_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_503.Parsetree.class_infos -> + 'g0 Ast_502.Parsetree.class_infos = fun f0 { Ast_503.Parsetree.pci_virt; @@ -941,10 +941,10 @@ and copy_include_description : fun x -> copy_include_infos copy_module_type x and copy_include_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_503.Parsetree.include_infos -> - 'g0 Ast_502.Parsetree.include_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_503.Parsetree.include_infos -> + 'g0 Ast_502.Parsetree.include_infos = fun f0 { Ast_503.Parsetree.pincl_mod; @@ -962,10 +962,10 @@ and copy_open_description : fun x -> copy_open_infos (fun x -> copy_loc copy_Longident_t x) x and copy_open_infos : - 'f0 'g0. - ('f0 -> 'g0) -> - 'f0 Ast_503.Parsetree.open_infos -> - 'g0 Ast_502.Parsetree.open_infos = + 'f0 'g0. + ('f0 -> 'g0) -> + 'f0 Ast_503.Parsetree.open_infos -> + 'g0 Ast_502.Parsetree.open_infos = fun f0 { Ast_503.Parsetree.popen_expr; @@ -1275,8 +1275,8 @@ and copy_Longident_t : Longident.t -> Longident.t = function Longident.Lapply (copy_Longident_t x0, copy_Longident_t x1) and copy_loc : - 'f0 'g0. - ('f0 -> 'g0) -> 'f0 Ast_503.Asttypes.loc -> 'g0 Ast_502.Asttypes.loc = + 'f0 'g0. + ('f0 -> 'g0) -> 'f0 Ast_503.Asttypes.loc -> 'g0 Ast_502.Asttypes.loc = fun f0 { Ast_503.Asttypes.txt; Ast_503.Asttypes.loc } -> { Ast_502.Asttypes.txt = f0 txt; Ast_502.Asttypes.loc = copy_location loc } diff --git a/astlib/pprintast.ml b/astlib/pprintast.ml index 51316cca8..6f822033a 100644 --- a/astlib/pprintast.ml +++ b/astlib/pprintast.ml @@ -233,14 +233,14 @@ let reset_pipe ctxt = { ctxt with pipe=false } *) let list : - 'a. - ?sep:space_formatter -> - ?first:space_formatter -> - ?last:space_formatter -> - (Format.formatter -> 'a -> unit) -> - Format.formatter -> - 'a list -> - unit = + 'a. + ?sep:space_formatter -> + ?first:space_formatter -> + ?last:space_formatter -> + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a list -> + unit = fun ?sep ?first ?last fu f xs -> let first = match first with Some x -> x | None -> ("" : _ format6) and last = match last with Some x -> x | None -> ("" : _ format6) @@ -264,13 +264,13 @@ let list : aux f xs let option : - 'a. - ?first:space_formatter -> - ?last:space_formatter -> - (Format.formatter -> 'a -> unit) -> - Format.formatter -> - 'a option -> - unit = + 'a. + ?first:space_formatter -> + ?last:space_formatter -> + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a option -> + unit = fun ?first ?last fu f a -> let first = match first with Some x -> x | None -> ("" : _ format6) and last = match last with Some x -> x | None -> ("" : _ format6) in @@ -282,14 +282,14 @@ let option : pp f last let paren : - 'a. - ?first:space_formatter -> - ?last:space_formatter -> - bool -> - (Format.formatter -> 'a -> unit) -> - Format.formatter -> - 'a -> - unit = + 'a. + ?first:space_formatter -> + ?last:space_formatter -> + bool -> + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a -> + unit = fun ?(first = ("" : _ format6)) ?(last = ("" : _ format6)) b fu f x -> if b then ( pp f "("; @@ -513,8 +513,10 @@ and pattern1 ctxt (f : Format.formatter) (x : pattern) : unit = | Ppat_construct ({ txt = Lident ("()" | "[]"); _ }, _) -> simple_pattern ctxt f x | Ppat_construct (({ txt; _ } as li), po) -> ( - if (* FIXME The third field always false *) - txt = Lident "::" then pp f "%a" pattern_list_helper x + if + (* FIXME The third field always false *) + txt = Lident "::" + then pp f "%a" pattern_list_helper x else match po with | Some ([], x) -> diff --git a/bench/drivers/identity/inputs/bap_knowledge.ml b/bench/drivers/identity/inputs/bap_knowledge.ml index 8e6e9e4d8..8e312f4ed 100644 --- a/bench/drivers/identity/inputs/bap_knowledge.ml +++ b/bench/drivers/identity/inputs/bap_knowledge.ml @@ -1109,8 +1109,8 @@ module Class = struct let refine { name } sort = { name; sort } let same x y = Name.equal x.name y.name - let equal : - type a b. (a, _) t -> (b, _) t -> (a obj, b obj) Type_equal.t option = + let equal : type a b. + (a, _) t -> (b, _) t -> (a obj, b obj) Type_equal.t option = fun x y -> Option.some_if (same x y) Type_equal.T let assert_equal x y = @@ -2294,8 +2294,7 @@ module Knowledge = struct type 'a ord = comparator_witness - let derive : - type a b. + let derive : type a b. (a, b) cls -> (module S with type t = (a, b) cls t @@ -2405,9 +2404,9 @@ module Knowledge = struct fun cls -> objects cls >>= fun objs -> with_new_object objs @@ fun obj objs -> - (update @@ function - | { classes } as s -> - { s with classes = Map.set classes ~key:cls.name ~data:objs }) + ( update @@ function + | { classes } as s -> + { s with classes = Map.set classes ~key:cls.name ~data:objs } ) >>| fun () -> obj let null _ = Oid.zero @@ -2539,8 +2538,7 @@ module Knowledge = struct include Binable.S with type t := t end - let derive : - type a. + let derive : type a. (a, _) cls -> (module S with type t = a obj and type comparator_witness = a ord) = fun _ -> diff --git a/bench/drivers/ppx_sexp_conv/inputs/bap_knowledge.ml b/bench/drivers/ppx_sexp_conv/inputs/bap_knowledge.ml index 8e6e9e4d8..8e312f4ed 100644 --- a/bench/drivers/ppx_sexp_conv/inputs/bap_knowledge.ml +++ b/bench/drivers/ppx_sexp_conv/inputs/bap_knowledge.ml @@ -1109,8 +1109,8 @@ module Class = struct let refine { name } sort = { name; sort } let same x y = Name.equal x.name y.name - let equal : - type a b. (a, _) t -> (b, _) t -> (a obj, b obj) Type_equal.t option = + let equal : type a b. + (a, _) t -> (b, _) t -> (a obj, b obj) Type_equal.t option = fun x y -> Option.some_if (same x y) Type_equal.T let assert_equal x y = @@ -2294,8 +2294,7 @@ module Knowledge = struct type 'a ord = comparator_witness - let derive : - type a b. + let derive : type a b. (a, b) cls -> (module S with type t = (a, b) cls t @@ -2405,9 +2404,9 @@ module Knowledge = struct fun cls -> objects cls >>= fun objs -> with_new_object objs @@ fun obj objs -> - (update @@ function - | { classes } as s -> - { s with classes = Map.set classes ~key:cls.name ~data:objs }) + ( update @@ function + | { classes } as s -> + { s with classes = Map.set classes ~key:cls.name ~data:objs } ) >>| fun () -> obj let null _ = Oid.zero @@ -2539,8 +2538,7 @@ module Knowledge = struct include Binable.S with type t := t end - let derive : - type a. + let derive : type a. (a, _) cls -> (module S with type t = a obj and type comparator_witness = a ord) = fun _ -> diff --git a/src/ast_pattern.mli b/src/ast_pattern.mli index 7515836fe..d81b98e58 100644 --- a/src/ast_pattern.mli +++ b/src/ast_pattern.mli @@ -22,7 +22,8 @@ type ('a, 'b, 'c) t = ('a, 'b, 'c) Ast_pattern0.t val parse : ('a, 'b, 'c) t -> Location.t -> ?on_error:(unit -> 'c) -> 'a -> 'b -> 'c -(** Matches a value against a pattern. Raise a located error in case of failure. *) +(** Matches a value against a pattern. Raise a located error in case of failure. +*) val parse_res : ('a, 'b, 'c) t -> diff --git a/src/ast_traverse.ml b/src/ast_traverse.ml index e44fbb0c2..329516e76 100644 --- a/src/ast_traverse.ml +++ b/src/ast_traverse.ml @@ -118,12 +118,12 @@ class map_with_expansion_context_and_errors = method nativeint = return method unit = return - method array - : 'a. - (Expansion_context.Base.t -> 'a -> 'a * Location.Error.t list) -> - Expansion_context.Base.t -> - 'a array -> - 'a array * Location.Error.t list = + method array : + 'a. + (Expansion_context.Base.t -> 'a -> 'a * Location.Error.t list) -> + Expansion_context.Base.t -> + 'a array -> + 'a array * Location.Error.t list = fun f ctx a -> let list, errors = self#list f ctx (Array.to_list a) in (Array.of_list list, errors) diff --git a/src/attribute.ml b/src/attribute.ml index 92ef8c6f7..dda1d0ac6 100644 --- a/src/attribute.ml +++ b/src/attribute.ml @@ -427,8 +427,7 @@ let pattern_res t p = let pattern t p = pattern_res t p |> Ast_pattern.to_func |> (fun f a b c d -> - f a b c d - |> Result.handle_error ~f:(fun (err, _) -> Location.Error.raise err)) + f a b c d |> Result.handle_error ~f:(fun (err, _) -> Location.Error.raise err)) |> Ast_pattern.of_func module Floating = struct diff --git a/src/attribute.mli b/src/attribute.mli index 6b6166fe9..3acf94149 100644 --- a/src/attribute.mli +++ b/src/attribute.mli @@ -133,7 +133,8 @@ val declare_with_attr_loc : (payload, 'b, 'c) Ast_pattern.t -> (attr_loc:Location.t -> 'b) -> ('a, 'c) t -(** Same as [declare] but the callback receives the location of the attribute. *) +(** Same as [declare] but the callback receives the location of the attribute. +*) type 'a flag = ('a, unit) t (** Types for attributes without payload. *) @@ -166,7 +167,8 @@ val has_flag_res : for the meaning of [mark_as_seen]. *) val has_flag : 'a flag -> ?mark_as_seen:bool (** default [true] *) -> 'a -> bool -(** See {!has_flag_res}. Raises a located error if the attribute is duplicated. *) +(** See {!has_flag_res}. Raises a located error if the attribute is duplicated. +*) val consume_res : ('a, 'b) t -> 'a -> (('a * 'b) option, Location.Error.t NonEmptyList.t) result diff --git a/src/common.ml b/src/common.ml index d0e9dbd0e..b936a1c34 100644 --- a/src/common.ml +++ b/src/common.ml @@ -115,8 +115,9 @@ class type_is_recursive rec_flag tds = | Pcstr_tuple args -> List.iter args ~f:self#core_type | Pcstr_record fields -> List.iter fields ~f:self#label_declaration - method! attributes _ = (* Don't recurse through attributes *) - () + method! attributes _ = + (* Don't recurse through attributes *) + () method go () = match rec_flag with diff --git a/src/common.mli b/src/common.mli index 72e1a507e..4e5d94fa0 100644 --- a/src/common.mli +++ b/src/common.mli @@ -31,7 +31,8 @@ val get_type_param_name_res : [tp] if it is a type parameter, as a result. *) val get_type_param_name : core_type * (variance * injectivity) -> string Loc.t -(** See {!get_type_param_name_res}. Raises a located error in case of failure. *) +(** See {!get_type_param_name_res}. Raises a located error in case of failure. +*) (** [(new type_is_recursive rec_flag tds)#go ()] returns whether [rec_flag, tds] is really a recursive type. We disregard recursive occurrences appearing in @@ -45,14 +46,16 @@ class type_is_recursive : rec_flag -> type_declaration list -> object end val really_recursive : rec_flag -> type_declaration list -> rec_flag -(** [really_recursive rec_flag tds = (new type_is_recursive rec_flag tds)#go ()] *) +(** [really_recursive rec_flag tds = (new type_is_recursive rec_flag tds)#go ()] +*) val loc_of_payload : attribute -> Location.t val loc_of_attribute : attribute -> Location.t val loc_of_extension : extension -> Location.t val curry_applications : expression -> expression -(** convert multi-arg function applications into a cascade of 1-arg applications *) +(** convert multi-arg function applications into a cascade of 1-arg applications +*) val attribute_of_warning : Location.t -> string -> attribute (** Encode a warning message into an 'ocaml.ppwarning' attribute which can be diff --git a/src/context_free.ml b/src/context_free.ml index d5a03ea58..1a0e60817 100644 --- a/src/context_free.ml +++ b/src/context_free.ml @@ -68,14 +68,14 @@ module Rule = struct | Extension : Extension.t t | Special_function : Special_function.t t | Constant : Constant.t t - | Attr_str_type_decl - : (structure_item, type_declaration) Attr_group_inline.t t - | Attr_sig_type_decl - : (signature_item, type_declaration) Attr_group_inline.t t - | Attr_str_module_type_decl - : (structure_item, module_type_declaration) Attr_inline.t t - | Attr_sig_module_type_decl - : (signature_item, module_type_declaration) Attr_inline.t t + | Attr_str_type_decl : + (structure_item, type_declaration) Attr_group_inline.t t + | Attr_sig_type_decl : + (signature_item, type_declaration) Attr_group_inline.t t + | Attr_str_module_type_decl : + (structure_item, module_type_declaration) Attr_inline.t t + | Attr_sig_module_type_decl : + (signature_item, module_type_declaration) Attr_inline.t t | Attr_str_type_ext : (structure_item, type_extension) Attr_inline.t t | Attr_sig_type_ext : (signature_item, type_extension) Attr_inline.t t | Attr_str_exception : (structure_item, type_exception) Attr_inline.t t @@ -653,17 +653,17 @@ class map_top_down ?(expect_mismatch_handler = Expect_mismatch_handler.nop) x method! module_expr base_ctxt x = - ((* Make sure code-path attribute is applied before expanding. *) - Attribute.get_res Ast_traverse.enter_module x |> of_result ~default:None - >>= function - | None -> return (base_ctxt, x) - | Some { loc; txt } -> - Attribute.remove_seen_res Module_expr - [ T Ast_traverse.enter_module ] - x - |> of_result ~default:x - >>| fun x -> - (Expansion_context.Base.enter_module ~loc txt base_ctxt, x)) + ( (* Make sure code-path attribute is applied before expanding. *) + Attribute.get_res Ast_traverse.enter_module x |> of_result ~default:None + >>= function + | None -> return (base_ctxt, x) + | Some { loc; txt } -> + Attribute.remove_seen_res Module_expr + [ T Ast_traverse.enter_module ] + x + |> of_result ~default:x + >>| fun x -> + (Expansion_context.Base.enter_module ~loc txt base_ctxt, x) ) >>= fun (base_ctxt, x) -> map_node EC.module_expr module_expr super#module_expr x.pmod_loc base_ctxt x diff --git a/src/deriving.ml b/src/deriving.ml index a94a31afb..3a400d5dc 100644 --- a/src/deriving.ml +++ b/src/deriving.ml @@ -128,8 +128,8 @@ module Args = struct | I_nil : ('m, 'm) instance | I_cons : ('m1, 'a -> 'm2) instance * 'a -> ('m1, 'm2) instance - let rec create : - type a b. (a, b) t -> (string * expression) list -> (a, b) instance = + let rec create : type a b. + (a, b) t -> (string * expression) list -> (a, b) instance = fun spec args -> match spec with | Nil -> I_nil diff --git a/src/expansion_context.mli b/src/expansion_context.mli index 78bc41cdf..9f4f9a48b 100644 --- a/src/expansion_context.mli +++ b/src/expansion_context.mli @@ -130,5 +130,6 @@ module Deriver : sig val make : derived_item_loc:Location.t -> inline:bool -> base:Base.t -> unit -> t - (** Build a new expansion context with the given item location and code path *) + (** Build a new expansion context with the given item location and code path + *) end diff --git a/src/extension.ml b/src/extension.ml index 20ec62590..9f4fe17c8 100644 --- a/src/extension.ml +++ b/src/extension.ml @@ -104,8 +104,7 @@ module Context = struct | Ppx_import, type_decl -> get_ppx_import_extension type_decl | _ -> None - let merge_attributes_res : - type a. + let merge_attributes_res : type a. a t -> a -> attributes -> (a, Location.Error.t NonEmptyList.t) result = fun t x attrs -> match t with @@ -152,8 +151,7 @@ struct with_arg : bool; } - let declare : - type a. + let declare : type a. with_arg:bool -> string -> a Context.t -> @@ -293,8 +291,8 @@ let check_context_for_inline : type a. func:string -> a Context.t -> unit = Printf.ksprintf invalid_arg "%s: %s can't be inlined" func (Context.desc context) -let rec filter_by_context : - type a. a Context.t -> t list -> a For_context.t list = +let rec filter_by_context : type a. + a Context.t -> t list -> a For_context.t list = fun context expanders -> match expanders with | [] -> [] diff --git a/src/location.mli b/src/location.mli index a6f4f6b54..47c8d4dcd 100644 --- a/src/location.mli +++ b/src/location.mli @@ -18,7 +18,8 @@ val in_file : string -> t (** Return an empty ghost range located in a given file. *) val set_filename : t -> string -> t -(** Set the [pos_fname] both in [loc_start] and [loc_end]. Leave the rest as is. *) +(** Set the [pos_fname] both in [loc_start] and [loc_end]. Leave the rest as is. +*) val none : t (** An arbitrary value of type [t]; describes an empty ghost range. *) @@ -81,7 +82,8 @@ module Error : sig [Location.raise_errorf]. *) val update_loc : t -> location -> t - (** Update where the error is located. The old location will be overwritten. *) + (** Update where the error is located. The old location will be overwritten. + *) val get_location : t -> location (** Find out where the error is located. *) diff --git a/src/location_check.ml b/src/location_check.ml index 2c0e35fe2..fcabcef06 100644 --- a/src/location_check.ml +++ b/src/location_check.ml @@ -152,7 +152,8 @@ let should_ignore loc attrs = (* If the filename changed, then there were line directives, and the locations are all messed up. *) (not (stayed_in_the_same_file loc.loc_start.pos_fname)) - || (* Ignore things explicitly marked. *) + || + (* Ignore things explicitly marked. *) List.exists ~f:(fun attr -> String.equal attr.attr_name.txt diff --git a/src/name.ml b/src/name.ml index 76d9d6284..da962efc6 100644 --- a/src/name.ml +++ b/src/name.ml @@ -292,14 +292,15 @@ module Registrar = struct Some (Format.asprintf "@[Hint:@ `%s'@ is@ available@ for@ %a%t.@]@\n\ - Did you put it at the wrong level?" name pp_text c - current_context) + Did you put it at the wrong level?" + name pp_text c current_context) | last :: rev_others -> let others = List.rev rev_others in Some (Format.asprintf "@[Hint:@ `%s'@ is@ available@ for@ %a@ and@ %a%t.@]@\n\ - Did you put it at the wrong level?" name + Did you put it at the wrong level?" + name (Format.pp_print_list pp_text ~pp_sep:(fun ppf () -> Format.fprintf ppf ",@ ")) others pp_text last current_context)) diff --git a/src/pp_ast.ml b/src/pp_ast.ml index 693d89f1e..c58e5c3ad 100644 --- a/src/pp_ast.ml +++ b/src/pp_ast.ml @@ -137,14 +137,14 @@ class lift_simple_val = | false -> Special "__attrs" | true -> super#attributes attrs - method lift_record_with_desc - : 'record 'desc. - lift_desc:('desc -> simple_val) -> - lift_record:('record -> simple_val) -> - desc:'desc -> - attrs:attributes -> - 'record -> - simple_val = + method lift_record_with_desc : + 'record 'desc. + lift_desc:('desc -> simple_val) -> + lift_record:('record -> simple_val) -> + desc:'desc -> + attrs:attributes -> + 'record -> + simple_val = fun ~lift_desc ~lift_record ~desc ~attrs x -> match (config.show_locs, config.show_attrs, attrs) with | false, false, _ | false, true, [] -> lift_desc desc diff --git a/traverse_builtins/ppxlib_traverse_builtins.ml b/traverse_builtins/ppxlib_traverse_builtins.ml index be8b847e7..9e9b3aa13 100644 --- a/traverse_builtins/ppxlib_traverse_builtins.ml +++ b/traverse_builtins/ppxlib_traverse_builtins.ml @@ -115,20 +115,19 @@ class ['ctx] map_with_context = method bool : ('ctx, bool) T.map_with_context = any method char : ('ctx, char) T.map_with_context = any - method option - : 'a. - ('ctx, 'a) T.map_with_context -> ('ctx, 'a option) T.map_with_context - = + method option : + 'a. + ('ctx, 'a) T.map_with_context -> ('ctx, 'a option) T.map_with_context = fun f ctx x -> match x with None -> None | Some x -> Some (f ctx x) - method list - : 'a. - ('ctx, 'a) T.map_with_context -> ('ctx, 'a list) T.map_with_context = + method list : + 'a. ('ctx, 'a) T.map_with_context -> ('ctx, 'a list) T.map_with_context + = fun f ctx l -> List.map (f ctx) l - method array - : 'a. - ('ctx, 'a) T.map_with_context -> ('ctx, 'a array) T.map_with_context = + method array : + 'a. ('ctx, 'a) T.map_with_context -> ('ctx, 'a array) T.map_with_context + = fun f ctx a -> Array.map (f ctx) a end @@ -184,10 +183,10 @@ class virtual ['ctx, 'res] lift_map_with_context = method virtual constr : 'ctx -> string -> 'res list -> 'res method virtual tuple : 'ctx -> 'res list -> 'res - method option - : 'a. - ('ctx, 'a, 'res) T.lift_map_with_context -> - ('ctx, 'a option, 'res) T.lift_map_with_context = + method option : + 'a. + ('ctx, 'a, 'res) T.lift_map_with_context -> + ('ctx, 'a option, 'res) T.lift_map_with_context = fun f ctx x -> match x with | None -> (None, self#constr ctx "None" []) @@ -195,10 +194,10 @@ class virtual ['ctx, 'res] lift_map_with_context = let x, res = f ctx x in (Some x, self#constr ctx "Some" [ res ]) - method list - : 'a. - ('ctx, 'a, 'res) T.lift_map_with_context -> - ('ctx, 'a list, 'res) T.lift_map_with_context = + method list : + 'a. + ('ctx, 'a, 'res) T.lift_map_with_context -> + ('ctx, 'a list, 'res) T.lift_map_with_context = fun f ctx l -> match l with | [] -> ([], self#constr ctx "[]" [])