@@ -32,7 +32,7 @@ type uncurry_expression_gen =
3232 Parsetree .expression ->
3333 Parsetree .expression_desc ) cxt
3434type uncurry_type_gen =
35- (Ast_compatible .arg_label ->
35+ (Asttypes .arg_label ->
3636 Parsetree .core_type ->
3737 Parsetree .core_type ->
3838 Parsetree .core_type ) cxt
@@ -165,10 +165,10 @@ let method_apply loc self obj name args =
165165 generic_apply `Method loc self obj args
166166 (fun loc obj -> Exp. mk ~loc (js_property loc obj name))
167167
168- let generic_to_uncurry_type kind loc (mapper : Bs_ast_mapper.mapper ) label
168+ let generic_to_uncurry_type kind loc (mapper : Bs_ast_mapper.mapper ) ( label : Asttypes.arg_label )
169169 (first_arg : Parsetree.core_type )
170170 (typ : Parsetree.core_type ) =
171- if not ( Ast_compatible. is_arg_label_simple label) then
171+ if label <> Nolabel then
172172 Bs_syntaxerr. err loc Label_in_uncurried_bs_attribute ;
173173
174174 let rec aux acc (typ : Parsetree.core_type ) =
@@ -182,7 +182,7 @@ let generic_to_uncurry_type kind loc (mapper : Bs_ast_mapper.mapper) label
182182 begin match typ.ptyp_desc with
183183 | Ptyp_arrow (label, arg, body)
184184 ->
185- if not ( Ast_compatible. is_arg_label_simple label) then
185+ if label <> Nolabel then
186186 Bs_syntaxerr. err typ.ptyp_loc Label_in_uncurried_bs_attribute ;
187187 aux (mapper.typ mapper arg :: acc) body
188188 | _ -> mapper.typ mapper typ, acc
@@ -226,7 +226,7 @@ let generic_to_uncurry_exp kind loc (self : Bs_ast_mapper.mapper) pat body
226226 begin match body.pexp_desc with
227227 | Pexp_fun (arg_label,_, arg, body)
228228 ->
229- if not ( Ast_compatible. is_arg_label_simple arg_label) then
229+ if arg_label <> Nolabel then
230230 Bs_syntaxerr. err loc Label_in_uncurried_bs_attribute ;
231231 aux (self.pat self arg :: acc) body
232232 | _ -> self.expr self body, acc
@@ -469,9 +469,8 @@ let ocaml_obj_as_js_object
469469 ->
470470 begin match e.pexp_desc with
471471 | Pexp_poly
472- (({pexp_desc = Pexp_fun (arg_label , _, pat, e)} ),
472+ (({pexp_desc = Pexp_fun (Nolabel , _, pat, e)} ),
473473 None )
474- when Ast_compatible. is_arg_label_simple arg_label
475474 ->
476475 let arity = Ast_pat. arity_of_fun pat e in
477476 let method_type =
@@ -533,9 +532,8 @@ let ocaml_obj_as_js_object
533532 ->
534533 begin match e.pexp_desc with
535534 | Pexp_poly
536- (({pexp_desc = Pexp_fun (arg_label , None , pat, e)} as f),
535+ (({pexp_desc = Pexp_fun (Nolabel , None , pat, e)} as f),
537536 None )
538- when Ast_compatible. is_arg_label_simple arg_label
539537 ->
540538 let arity = Ast_pat. arity_of_fun pat e in
541539 let alias_type =
0 commit comments