Skip to content

Commit c69f0ef

Browse files
committed
clean: unused var warnings on ocaml < 4.08
1 parent d31f1a2 commit c69f0ef

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed

src-bs/shims_let_ops_.ml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
(* Note: copied from src/gen/mkshims.ml *)
2-
module type S = sig
2+
module type I = sig
33
type ('i, 'a, 'e) t
4+
5+
val ( >|= ) : ('i, 'a, 'e) t -> ('a -> 'b) -> ('i, 'b, 'e) t
6+
7+
val monoid_product : ('i, 'a, 'e) t -> ('i, 'b, 'e) t -> ('i, 'a * 'b, 'e) t
8+
9+
val ( >>= ) : ('i, 'a, 'e) t -> ('a -> ('i, 'b, 'e) t) -> ('i, 'b, 'e) t
410
end
511

6-
module Make (X : sig
12+
module type S = sig
713
type ('i, 'a, 'e) t
8-
end) =
9-
struct
14+
end
15+
16+
module Make (X : I) = struct
1017
type ('i, 'a, 'e) t = ('i, 'a, 'e) X.t
1118
end

src/gen/mkshims.ml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
(* Note: also copied to src-bs/shims_let_ops_.ml *)
2+
3+
let shims_all =
4+
{|
5+
module type I = sig
6+
type ('i, 'a, 'e) t
7+
val (>|=) : ('i, 'a, 'e) t -> ('a -> 'b) -> ('i, 'b, 'e) t
8+
val monoid_product : ('i, 'a, 'e) t -> ('i, 'b, 'e) t -> ('i, ('a * 'b), 'e) t
9+
val (>>=) : ('i, 'a, 'e) t -> ('a -> ('i, 'b, 'e) t) -> ('i, 'b, 'e) t
10+
end
11+
|}
12+
13+
214
let shims_let_op_pre_408 =
315
{|
416
module type S = sig type ('i, 'o, 'e) t end
5-
module Make(X:sig type ('i, 'o, 'e) t end)
6-
: S with type ('i, 'o, 'e) t = ('i, 'o, 'e) X.t = struct
17+
module Make(X : I) : S with type ('i, 'o, 'e) t = ('i, 'o, 'e) X.t =
18+
struct
719
type ('i, 'o, 'e) t = ('i, 'o, 'e) X.t
820
end
921
|}
@@ -19,12 +31,8 @@ let shims_let_op_post_408 =
1931
val ( and* ) : ('i, 'a, 'e) t -> ('i, 'b, 'e) t -> ('i, 'a * 'b, 'e) t
2032
end
2133

22-
module Make(X:sig
23-
type ('i, 'a, 'e) t
24-
val (>|=) : ('i, 'a, 'e) t -> ('a -> 'b) -> ('i, 'b, 'e) t
25-
val monoid_product : ('i, 'a, 'e) t -> ('i, 'b, 'e) t -> ('i, ('a * 'b), 'e) t
26-
val (>>=) : ('i, 'a, 'e) t -> ('a -> ('i, 'b, 'e) t) -> ('i, 'b, 'e) t
27-
end) : S with type ('i, 'o, 'e) t = ('i, 'o, 'e) X.t = struct
34+
module Make(X : I) : S with type ('i, 'o, 'e) t = ('i, 'o, 'e) X.t =
35+
struct
2836
type ('i, 'o, 'e) t = ('i, 'o, 'e) X.t
2937
let (let+) = X.(>|=)
3038
let (and+) = X.monoid_product
@@ -37,6 +45,7 @@ let shims_let_op_post_408 =
3745
let () =
3846
let version = Sys.ocaml_version in
3947
let major, minor = Scanf.sscanf version "%u.%u" (fun maj min -> (maj, min)) in
48+
print_endline shims_all ;
4049
print_endline
4150
( if (major, minor) >= (4, 8)
4251
then shims_let_op_post_408

0 commit comments

Comments
 (0)