Skip to content

Commit a4c05cc

Browse files
committed
rename
1 parent 555cdbd commit a4c05cc

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

compiler/frontend/ast_external_process.ml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,7 @@ let process_obj (loc : Location.t) (st : external_desc) (prim_name : string)
433433
if String.length prim_name <> 0 then
434434
Location.raise_errorf ~loc
435435
"%@obj expect external names to be empty string";
436-
let ( arg_kinds,
437-
new_arg_types_ty,
438-
(result_types : Parsetree.object_field list) ) =
436+
let arg_kinds, args, (result_types : Parsetree.object_field list) =
439437
Ext_list.fold_right arg_types_ty ([], [], [])
440438
(fun
441439
param_type
@@ -591,8 +589,8 @@ let process_obj (loc : Location.t) (st : external_desc) (prim_name : string)
591589
(* result type can not be labeled *)
592590
in
593591

594-
( List.length new_arg_types_ty,
595-
Ast_helper.Typ.arrows ~loc new_arg_types_ty result,
592+
( List.length args,
593+
Ast_helper.Typ.arrows ~loc args result,
596594
External_ffi_types.ffi_obj_create arg_kinds )
597595
| _ -> Location.raise_errorf ~loc "Attribute found that conflicts with %@obj"
598596

@@ -938,7 +936,7 @@ let handle_attributes (loc : Bs_loc.t) (type_annotation : Parsetree.core_type)
938936
(build_uncurried_type ~arity new_type, spec, unused_attrs, false)
939937
else
940938
let splice = external_desc.splice in
941-
let arg_type_specs, new_arg_types_ty, arg_type_specs_length =
939+
let arg_type_specs, args, arg_type_specs_length =
942940
Ext_list.fold_right arg_types_ty
943941
(([], [], 0) : External_arg_spec.params * Parsetree.arg list * int)
944942
(fun param_type (arg_type_specs, arg_types, i) ->
@@ -1005,8 +1003,8 @@ let handle_attributes (loc : Bs_loc.t) (type_annotation : Parsetree.core_type)
10051003
let return_wrapper =
10061004
check_return_wrapper loc external_desc.return_wrapper result_type
10071005
in
1008-
let fn_type = Ast_helper.Typ.arrows ~loc new_arg_types_ty result_type in
1009-
( build_uncurried_type ~arity:(List.length new_arg_types_ty) fn_type,
1006+
let fn_type = Ast_helper.Typ.arrows ~loc args result_type in
1007+
( build_uncurried_type ~arity:(List.length args) fn_type,
10101008
External_ffi_types.ffi_bs arg_type_specs return_wrapper ffi,
10111009
unused_attrs,
10121010
relative )

0 commit comments

Comments
 (0)