diff --git a/benchs/dune b/benchs/dune index 962fc524..ff3ac80f 100644 --- a/benchs/dune +++ b/benchs/dune @@ -3,6 +3,6 @@ (libraries containers containers-data containers-thread benchmark gen iter qcheck oseq batteries base sek) - (flags :standard -warn-error -3 -safe-string -color always -open CCShims_) + (flags :standard -warn-error -3-5 -safe-string -color always -open CCShims_) (ocamlopt_flags :standard -O3 -color always -unbox-closures -unbox-closures-factor 20)) diff --git a/benchs/run_benchs.ml b/benchs/run_benchs.ml index cedf2f60..6539ad7a 100644 --- a/benchs/run_benchs.ml +++ b/benchs/run_benchs.ml @@ -1,5 +1,7 @@ (** Generic benchs *) +[@@@warning "-5"] + module B = Benchmark let (@>) = B.Tree.(@>) let (@>>) = B.Tree.(@>>) @@ -952,7 +954,7 @@ module Iter_ = struct if !saw_x then (saw_x := true; Some x) else xs () in - let xs = Array.init n Fun.id in + let xs = Array.init n CCFun.id in let iter () = ignore (Array.fold_right Iter.cons xs Iter.empty : int Iter.t) in let gen () = ignore (Array.fold_right gen_cons xs Gen.empty : int Gen.t) in let oseq () = ignore (Array.fold_right OSeq.cons xs OSeq.empty : int OSeq.t) in @@ -969,7 +971,7 @@ module Iter_ = struct if !saw_x then (saw_x := true; Some x) else xs () in - let xs = Array.init n Fun.id in + let xs = Array.init n CCFun.id in let iter () = Iter.fold (+) 0 (Array.fold_right Iter.cons xs Iter.empty) in let gen () = Gen.fold (+) 0 (Array.fold_right gen_cons xs Gen.empty) in let oseq () = OSeq.fold (+) 0 (Array.fold_right OSeq.cons xs OSeq.empty) in diff --git a/benchs/run_objsize.ml b/benchs/run_objsize.ml index 98e378d5..8b078820 100644 --- a/benchs/run_objsize.ml +++ b/benchs/run_objsize.ml @@ -1,6 +1,6 @@ (* module Deque = Core_kernel.Deque *) -module Int_map = Map.Make(CCInt) -module Int_set = Set.Make(CCInt) +module Int_map = CCMap.Make(CCInt) +module Int_set = CCSet.Make(CCInt) let dup = CCPair.dup let id = CCFun.id @@ -19,10 +19,10 @@ let dummy = 0 let types = [ "Stdlib.List", (fun n -> Obj.magic @@ ns n); "Stdlib.Array", (fun n -> Obj.magic @@ Array.init n id); - "Stdlib.Hashtbl", (fun n -> Obj.magic @@ Hashtbl.of_seq (OSeq.init ~n dup)); + "Stdlib.Hashtbl", (fun n -> Obj.magic @@ CCHashtbl.of_iter Iter.(init dup |> take n)); "Base.Hashtbl", (fun n -> Obj.magic @@ Base.Hashtbl.Poly.of_alist_exn (List.init n dup)); - "Stdlib.Map", (fun n -> Obj.magic @@ Int_map.of_seq (OSeq.init ~n dup)); - "Stdlib.Set", (fun n -> Obj.magic @@ Int_set.of_seq (OSeq.init ~n id)); + "Stdlib.Map", (fun n -> Obj.magic @@ Int_map.of_iter Iter.(init dup |> take n)); + "Stdlib.Set", (fun n -> Obj.magic @@ Int_set.of_iter Iter.(init id |> take n)); "CCFun_vec", (fun n -> Obj.magic @@ CCFun_vec.of_list (ns n)); "CCRAL", (fun n -> Obj.magic @@ CCRAL.of_list (ns n)); "BatVect", (fun n -> Obj.magic @@ BatVect.of_list (ns n)); @@ -31,7 +31,7 @@ let types = [ "CCVector", (fun n -> Obj.magic @@ let c = CCVector.create () in iter_range n (CCVector.push c); c); (* "Core_kernel.Deque", (fun n -> Obj.magic @@ let c = Deque.create () in iter_range n (Deque.enqueue_back c); c); *) "Base.Queue", (fun n -> Obj.magic @@ let c = Base.Queue.create () in iter_range n (Base.Queue.enqueue c); c); - "Stdlib.Queue", (fun n -> Obj.magic @@ Queue.of_seq (OSeq.init ~n id)); + "Stdlib.Queue", (fun n -> Obj.magic @@ (let q = Queue.create () in iter_range n (fun x -> Queue.push x q); q)); "CCQueue", (fun n -> Obj.magic @@ CCDeque.of_list (ns n)); "Iter", (fun n -> Obj.magic @@ List.fold_right Iter.cons (ns n) Iter.empty); "Gen", (fun n -> Obj.magic @@ List.fold_right gen_cons (ns n) Gen.empty); diff --git a/src/core/CCSexp.ml b/src/core/CCSexp.ml index eea0ece2..f31a2378 100644 --- a/src/core/CCSexp.ml +++ b/src/core/CCSexp.ml @@ -5,7 +5,6 @@ open CCShims_ type 'a or_error = ('a, string) result -type 'a iter = ('a -> unit) -> unit type 'a gen = unit -> 'a option module type SEXP = CCSexp_intf.SEXP diff --git a/src/data/CCBitField.mli b/src/data/CCBitField.mli index b5f29d2e..43680ad9 100644 --- a/src/data/CCBitField.mli +++ b/src/data/CCBitField.mli @@ -60,7 +60,7 @@ module type S = sig end (** Create a new bitfield type *) -module Make(X : sig end) : S +module Make : functor(_ : sig end) -> S (**/**) val all_bits_ : int -> int -> int