File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -131,9 +131,6 @@ let get_curry_arity (ty : t) =
131
131
132
132
let is_arity_one ty = get_curry_arity ty = 1
133
133
134
- let mk_fn_type ~loc (new_arg_types_ty : Parsetree.arg list ) (result : t ) : t =
135
- Typ. arrows ~loc new_arg_types_ty result
136
-
137
134
let list_of_arrow (ty : t ) : t * Parsetree.arg list =
138
135
let rec aux (ty : t ) acc =
139
136
match ty.ptyp_desc with
@@ -148,6 +145,6 @@ let list_of_arrow (ty : t) : t * Parsetree.arg list =
148
145
149
146
let add_last_obj (ty : t ) (obj : t ) =
150
147
let result, params = list_of_arrow ty in
151
- mk_fn_type ~loc: obj.ptyp_loc
148
+ Typ. arrows ~loc: obj.ptyp_loc
152
149
(params @ [{lbl = Nolabel ; typ = obj; attrs = [] }])
153
150
result
Original file line number Diff line number Diff line change @@ -47,8 +47,6 @@ val get_uncurry_arity : t -> int option
47
47
None -- means not a function
48
48
*)
49
49
50
- val mk_fn_type : loc :Location .t -> Parsetree .arg list -> t -> t
51
-
52
50
val list_of_arrow : t -> t * Parsetree .arg list
53
51
(* * fails when Ptyp_poly *)
54
52
Original file line number Diff line number Diff line change @@ -592,7 +592,7 @@ let process_obj (loc : Location.t) (st : external_desc) (prim_name : string)
592
592
in
593
593
594
594
( List. length new_arg_types_ty,
595
- Ast_core_type. mk_fn_type ~loc new_arg_types_ty result,
595
+ Ast_helper.Typ. arrows ~loc new_arg_types_ty result,
596
596
External_ffi_types. ffi_obj_create arg_kinds )
597
597
| _ -> Location. raise_errorf ~loc " Attribute found that conflicts with %@obj"
598
598
@@ -1005,7 +1005,7 @@ let handle_attributes (loc : Bs_loc.t) (type_annotation : Parsetree.core_type)
1005
1005
let return_wrapper =
1006
1006
check_return_wrapper loc external_desc.return_wrapper result_type
1007
1007
in
1008
- let fn_type = Ast_core_type. mk_fn_type ~loc new_arg_types_ty result_type in
1008
+ let fn_type = Ast_helper.Typ. arrows ~loc new_arg_types_ty result_type in
1009
1009
( build_uncurried_type ~arity: (List. length new_arg_types_ty) fn_type,
1010
1010
External_ffi_types. ffi_bs arg_type_specs return_wrapper ffi,
1011
1011
unused_attrs,
You can’t perform that action at this time.
0 commit comments