Skip to content

Commit edcf68b

Browse files
committed
fmt
1 parent 4c58844 commit edcf68b

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

compiler/src/typed/cmi_format.re

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ open Wasm_utils;
2020
[@deriving (sexp, yojson)]
2121
type pers_flags =
2222
| Opaque
23-
| Unsafe_string;
23+
| Unsafe_string;
2424

2525
type error =
2626
| Not_an_interface(string)
@@ -102,22 +102,21 @@ let input_cmi = ic =>
102102
| Result.Error(e) => raise(Invalid_argument(e))
103103
};
104104

105-
let deserialize_cmi = ic => size => {
105+
let deserialize_cmi = (ic, size) => {
106106
let size = ref(size);
107-
let lexbuf = Lexing.from_function (buf => n => {
108-
let n = min (n, size^);
109-
let read = input(ic, buf, 0, n);
110-
size := size^ - read;
111-
read
112-
});
113-
let state = Yojson.init_lexer ();
114-
switch (
115-
cmi_infos_of_yojson @@ Yojson.Safe.from_lexbuf(state, lexbuf)
116-
) {
107+
let lexbuf =
108+
Lexing.from_function((buf, n) => {
109+
let n = min(n, size^);
110+
let read = input(ic, buf, 0, n);
111+
size := size^ - read;
112+
read;
113+
});
114+
let state = Yojson.init_lexer();
115+
switch (cmi_infos_of_yojson @@ Yojson.Safe.from_lexbuf(state, lexbuf)) {
117116
| Result.Ok(x) => x
118117
| Result.Error(e) => raise(Invalid_argument(e))
119-
}
120118
};
119+
};
121120

122121
let serialize_cmi =
123122
(

compiler/src/utils/wasm_utils.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ module type BinarySectionSpec = {
413413
type t;
414414

415415
let name: string;
416-
let deserialize: in_channel => int => t;
416+
let deserialize: (in_channel, int) => t;
417417
let accepts_version: abi_version => bool;
418418
let serialize: t => bytes;
419419
};

compiler/src/utils/wasm_utils.rei

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module type BinarySectionSpec = {
5757
type t;
5858

5959
let name: string;
60-
let deserialize: in_channel => int => t;
60+
let deserialize: (in_channel, int) => t;
6161
let accepts_version: abi_version => bool;
6262
let serialize: t => bytes;
6363
};

0 commit comments

Comments
 (0)