aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2014-04-22 15:31:12 +0200
committerPierre-Marie Pédrot2014-04-23 12:09:14 +0200
commit74ddca99c649f2f8c203582a9b82bddf64fb6b52 (patch)
treef23aa6340c2630619864666ef5eed257d3d765d9 /lib
parentd23c7539887366202bc370d0f80c26a557486e1c (diff)
Removing dead code, thanks to new OCaml warnings and a bit of scripting.
Diffstat (limited to 'lib')
-rw-r--r--lib/bigint.ml4
-rw-r--r--lib/util.ml4
-rw-r--r--lib/util.mli1
3 files changed, 2 insertions, 7 deletions
diff --git a/lib/bigint.ml b/lib/bigint.ml
index 4dc93e6e82..de096493f4 100644
--- a/lib/bigint.ml
+++ b/lib/bigint.ml
@@ -63,7 +63,6 @@ module ArrayInt = struct
(* Basic numbers *)
let zero = [||]
-let neg_one = [|-1|]
let is_zero = function
| [||] -> true
@@ -74,7 +73,7 @@ let is_zero = function
- it is [|-1|]
- its first bloc is in [-base;-1[U]0;base[
and the other blocs are in [0;base[. *)
-
+(*
let canonical n =
let ok x = (0 <= x && x < base) in
let rec ok_tail k = (Int.equal k 0) || (ok n.(k) && ok_tail (k-1)) in
@@ -82,6 +81,7 @@ let canonical n =
in
(is_zero n) || (match n with [|-1|] -> true | _ -> false) ||
(ok_init n.(0) && ok_tail (Array.length n - 1))
+*)
(* [normalize_pos] : removing initial blocks of 0 *)
diff --git a/lib/util.ml b/lib/util.ml
index c293e4dfda..9ade75147b 100644
--- a/lib/util.ml
+++ b/lib/util.ml
@@ -100,10 +100,6 @@ let iterate =
let repeat n f x =
let rec loop i = if i <> 0 then (f x; loop (i - 1)) in loop n
-let iterate_for a b f x =
- let rec iterate i v = if i > b then v else iterate (succ i) (f i v) in
- iterate a x
-
let app_opt f x =
match f with
| Some f -> f x
diff --git a/lib/util.mli b/lib/util.mli
index c9456802d7..d3e3432a33 100644
--- a/lib/util.mli
+++ b/lib/util.mli
@@ -87,7 +87,6 @@ val compose : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b
val const : 'a -> 'b -> 'a
val iterate : ('a -> 'a) -> int -> 'a -> 'a
val repeat : int -> ('a -> unit) -> 'a -> unit
-val iterate_for : int -> int -> (int -> 'a -> 'a) -> 'a -> 'a
val app_opt : ('a -> 'a) option -> 'a -> 'a
(** {6 Delayed computations. } *)