-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathexpected_bindings.ml
35 lines (27 loc) · 1.27 KB
/
expected_bindings.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
type nonrec single_tuple = { inner: string } [@@boxed]
external new_t : unit -> single_tuple = "new"
external print_t : single_tuple -> unit = "print"
module Car = struct
type nonrec t
end
external fn_one_parameter : Car.t -> Car.t = "fn_one_parameter"
external fn_two_parameters : Car.t -> int -> Car.t = "fn_two_parameters"
external fn_three_parameters : Car.t -> int -> int -> Car.t = "fn_three_parameters"
external fn_four_parameters : Car.t -> int -> int -> int -> Car.t = "fn_four_parameters"
external fn_five_parameters : Car.t -> int -> int -> int -> int -> Car.t = "fn_five_parameters"
external fn_six_parameters : Car.t -> int -> int -> int -> int -> int -> Car.t = "fn_six_parameters_bytecode" "fn_six_parameters"
external test_add_i32 : int32 -> int32 -> int32 = "test_add_i32"
external test_add_usize : int -> int -> int = "test_add_usize"
external test_bytes_get : bytes -> int -> char = "test_bytes_get"
external test_get_ascii_code : char -> int32 = "test_get_ascii_code"
module Toyota = struct
type nonrec t = Car.t
external create_toyota : unit -> t = "create_toyota"
end
module Packages = struct
type nonrec ('t) t = { gift: 't } [@@boxed]
end
module Gifts = struct
type nonrec t = (string) Packages.t
external pack_present : unit -> t = "pack_present"
end