Skip to content

Commit 040fe2f

Browse files
committed
move to dune 3.0, fix warnings
1 parent 8eaa2b6 commit 040fe2f

File tree

13 files changed

+29
-54
lines changed

13 files changed

+29
-54
lines changed

benchs/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
batteries
1313
base
1414
sek)
15-
(flags :standard -warn-error -3-5 -safe-string -color always)
15+
(flags :standard -warn-error -3-5 -w -60 -safe-string -color always)
1616
(optional)
1717
(ocamlopt_flags
1818
:standard

benchs/run_bench_hash.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ let random_tree =
1212
~subn:[ (int 10, fun sublist -> pure mk_node <*> small_int <*> sublist) ]
1313
(int_range 15 150))
1414

15-
let random_list =
16-
CCRandom.(int 5 >>= fun len -> CCList.random_len len random_tree)
17-
1815
let rec eq t1 t2 =
1916
match t1, t2 with
2017
| Empty, Empty -> true

benchs/run_benchs.ml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ let app_ints f l = B.Tree.concat (List.map (app_int f) l)
1616

1717
(* for benchmark *)
1818
let repeat = 3
19-
20-
(* composition *)
21-
let ( %% ) f g x = f (g x)
2219
let opaque_ignore x = ignore (Sys.opaque_identity x)
2320

2421
module L = struct
@@ -144,8 +141,6 @@ module L = struct
144141

145142
(* APPEND *)
146143

147-
let append_ f (l1, l2, l3) = ignore (f (f l1 l2) l3)
148-
149144
let bench_append ?(time = 2) n =
150145
let l1 = CCList.(1 -- n) in
151146
let l2 = CCList.(n + 1 -- (2 * n)) in

containers-data.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tags: ["containers" "RAL" "function" "vector" "okasaki"]
99
homepage: "https://github.com/c-cube/ocaml-containers/"
1010
bug-reports: "https://github.com/c-cube/ocaml-containers/issues"
1111
depends: [
12-
"dune" {>= "2.9"}
12+
"dune" {>= "3.0"}
1313
"ocaml" {>= "4.08"}
1414
"containers" {= version}
1515
"qcheck-core" {>= "0.18" & with-test}

containers.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ tags: ["stdlib" "containers" "iterators" "list" "heap" "queue"]
1010
homepage: "https://github.com/c-cube/ocaml-containers/"
1111
bug-reports: "https://github.com/c-cube/ocaml-containers/issues"
1212
depends: [
13-
"dune" {>= "2.9"}
13+
"dune" {>= "3.0"}
1414
"ocaml" {>= "4.08"}
1515
"either"
1616
"dune-configurator"

dune

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,26 @@
1616
(locks /ctest)
1717
(action
1818
(diff README.md README.md.corrected)))
19+
20+
(env
21+
(_
22+
(flags
23+
:standard
24+
-warn-error
25+
-a+8
26+
-w
27+
-32-48-60-70
28+
-w
29+
+a-4-40-42-44-70
30+
-color
31+
always
32+
-safe-string
33+
-strict-sequence)
34+
(ocamlopt_flags
35+
:standard
36+
-O3
37+
-unbox-closures
38+
-unbox-closures-factor
39+
20
40+
-inline
41+
100)))

dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(lang dune 2.9)
1+
(lang dune 3.0)
22
(name containers)
33
(generate_opam_files true)
44

examples/ccparse_sexp.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ let rec pp_sexpr out (s : sexp) : unit =
1616
l;
1717
Format.fprintf out "@])"
1818

19-
let str_of_sexp = CCFormat.to_string pp_sexpr
20-
2119
let skip_white_and_comments =
2220
fix @@ fun self ->
2321
skip_white

src/core/tests/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(executable
22
(name check_labelled_mods)
33
(modules check_labelled_mods)
4-
(flags :standard -warn-error -a -w -3-33-35-27-39-50 -nolabels)
4+
(flags :standard -warn-error -a -w -3-33-35-27-39-50-60 -nolabels)
55
(libraries containers))
66

77
(executable

src/core/tests/test_hash.ml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ module Hist = struct
1010

1111
let create () : t = { tbl = Hashtbl.create 32; n_samples = 0 }
1212

13-
let add self x =
14-
Hashtbl.replace self.tbl x (1 + try Hashtbl.find self.tbl x with _ -> 0);
15-
self.n_samples <- 1 + self.n_samples
16-
1713
let add_n self x n =
1814
Hashtbl.replace self.tbl x (n + try Hashtbl.find self.tbl x with _ -> 0);
1915
self.n_samples <- n + self.n_samples

0 commit comments

Comments
 (0)