Permalink
Browse files

Silence a bunch of 4.00 warnings

  • Loading branch information...
1 parent 2434189 commit c11775fc7164948bd1ffb8cf1c7df21208a4a690 @thelema thelema committed Aug 30, 2012
View
@@ -527,6 +527,19 @@ sig
(**/**)
end
+module Incubator : sig
+ module Eq (T : BatOrd.Eq) : sig
+ type t = T.t array
+ val eq : T.t array BatOrd.eq
+ end
+
+ module Ord (T : BatOrd.Ord) : sig
+ type t = T.t array
+ val ord : T.t array BatOrd.ord
+ end
+end
+
+
(**/**)
(* for tests *)
val is_sorted_by : ('a -> 'b) -> 'a array -> bool
View
@@ -37,7 +37,7 @@ let create l v r =
Node (l, v, r, h')
(* Assume |hl - hr| < 3 *)
-let rec bal l v r =
+let bal l v r =
let hl = height l in
let hr = height r in
if hl >= hr + 2 then
View
@@ -226,7 +226,7 @@ let to_lazy_list_filter kwd_table x =
(BatLazyList.of_enum (to_enum_filter kwd_table (BatLazyList.enum x)))
-
+(* DEAD CODE
let ocaml_comment =
string "(*" >>= fun _ ->
let rec content () =
@@ -239,6 +239,7 @@ let ocaml_comment =
| _ -> content() )
| _ -> content ()
in content ()
+ *)
let ocaml_escape = label "OCaml-style escaped character"
(
View
@@ -121,7 +121,7 @@ let stderr_formatter = make_std_formatter BatIO.stderr
let null_formatter lm lev event timestamp = ()
let format_indent oc depth =
- for i = 0 to depth do
+ for _i = 0 to depth do
fprintf oc "| "
done
@@ -195,7 +195,8 @@ let init_from_string name_level_string formatter =
(******************************************************************************)
-let test () =
+(*
+let test =
let lm = make_log "test" in
let direct () =
log lm NOTICE (fun () -> "hello", []);
@@ -208,5 +209,6 @@ let test () =
Unix.sleep 3;
run ()
in run ()
+ *)
(******************************************************************************)
View
@@ -40,7 +40,7 @@ let remove k d t =
with Not_found -> t
let mem = BatMap.mem
-let exists = mem
+(* let exists = mem *)
let iter = BatMap.iter
let map = BatMap.map
let mapi = BatMap.mapi
View
@@ -65,7 +65,7 @@ let remove k d t =
let mem k d = M.mem k d.content
-let exists = mem
+(* let exists = mem *)
let iter f d = M.iter f d.content
View
@@ -60,7 +60,7 @@ module GetOpt =
let parse only_leading_opts other find_short_opt find_long_opt args =
let rec loop args =
- let rec gather_args name n args =
+ let gather_args name n args =
try
BatList.split_nth n args
with
View
@@ -156,7 +156,7 @@ module Incubator = struct
random_enum state char
type implementation = { st : int array; mutable idx : int };;
- external t_of_impl: implementation -> t = "%identity"
+(* external t_of_impl: implementation -> t = "%identity" *)
external impl_of_t: t -> implementation = "%identity"
let perturb state =
View
@@ -1,5 +1,4 @@
-open BatPervasives
type ('a, 'b) t = ('a, 'b) BatPervasives.result =
| Ok of 'a
| Bad of 'b
View
@@ -104,7 +104,7 @@ struct
let is_empty (Map tr) = tr = Empty
- let kcmp (j, _) (k, _) = Ord.compare j k
+(* let kcmp (j, _) (k, _) = Ord.compare j k*)
let ksel j (k, _) = Ord.compare j k
let singleton' k v = Node (Empty, (k, v), Empty)
View
@@ -27,4 +27,6 @@ module Map (Ord : BatInterfaces.OrderedType)
('a BatInnerIO.output -> key -> unit) ->
('a BatInnerIO.output -> 'c -> unit) ->
'a BatInnerIO.output -> 'c t -> unit
+ val of_list : (Ord.t * 'a) list -> 'a t
+ val to_list : 'a t -> (Ord.t * 'a) list
end
View
@@ -409,3 +409,9 @@ val compare : t -> t -> int
val print : 'a BatInnerIO.output -> t -> unit
(** Prints a rope to the given out_channel *)
+
+(**/**)
+val write_lines : (Text.t BatEnum.t, 'a) printer
+val write_texts : (Text.t BatEnum.t, 'a) printer
+val write_chars : (UChar.t BatEnum.t, 'a) printer
+(**/**)
View
@@ -67,7 +67,6 @@ let invariants t =
type 'a forest_element = { mutable c : 'a t; mutable len : int }
let str_append = STRING.append
-let empty_str = [||]
let string_of_string_list = STRING.concat
let singleton x = Leaf [|x|]
@@ -97,7 +96,7 @@ let height = function
| Empty | Leaf _ -> 0
| Concat (_, _, _, _, h) -> h
-let rec length = function
+let length = function
| Empty -> 0
| Leaf s -> STRING.length s
| Concat (_, cl, _, cr, _) -> cl + cr
@@ -348,7 +347,7 @@ let rec rev_cons_iter s t =
| Leaf s -> C (s, (STRING.length s - 1), Empty, t)
| Concat (l, _, r, _, _) -> rev_cons_iter r (rev_cons_iter l t)
-let rec enum_next l () =
+let enum_next l () =
match !l with
| E -> raise BatEnum.No_more_elements
| C (s, p, r, t) ->
@@ -358,7 +357,7 @@ let rec enum_next l () =
l := C (s, p + 1, r, t);
STRING.unsafe_get s p
-let rec enum_backwards_next l () =
+let enum_backwards_next l () =
match !l with
| E -> raise BatEnum.No_more_elements
| C (s, p, r, t) ->
@@ -368,13 +367,13 @@ let rec enum_backwards_next l () =
l := C (s, p - 1, r, t);
STRING.unsafe_get s p
-let rec enum_count l () =
+let enum_count l () =
let rec aux n = function
| E -> n
| C (s, p, m, t) -> aux (n + (STRING.length s - p) + length m) t
in aux 0 !l
-let rec rev_enum_count l () =
+let rev_enum_count l () =
let rec aux n = function
| E -> n
| C (s, p, m, t) -> aux (n + (p + 1) + length m) t
@@ -673,7 +672,6 @@ struct
type 'a forest_element = { mutable c : 'a t; mutable len : int }
let str_append = STRING.append
- let empty_str = STRING.empty
let string_of_string_list = STRING.concat
let singleton x = Leaf (STRING.make 1 x)
@@ -691,7 +689,7 @@ struct
| Empty | Leaf _ -> 0
| Concat (_, _, _, _, h) -> h
- let rec length = function
+ let length = function
| Empty -> 0
| Leaf s -> STRING.length s
| Concat (_, cl, _, cr, _) -> cl + cr
@@ -927,7 +925,7 @@ struct
| Leaf s -> C (s, (STRING.length s - 1), Empty, t)
| Concat (l, _, r, _, _) -> rev_cons_iter r (rev_cons_iter l t)
- let rec enum_next l () =
+ let enum_next l () =
match !l with
| E -> raise BatEnum.No_more_elements
| C (s, p, r, t) ->
@@ -937,7 +935,7 @@ struct
l := C (s, p + 1, r, t);
STRING.unsafe_get s p
- let rec enum_backwards_next l () =
+ let enum_backwards_next l () =
match !l with
| E -> raise BatEnum.No_more_elements
| C (s, p, r, t) ->
@@ -947,13 +945,13 @@ struct
l := C (s, p - 1, r, t);
STRING.unsafe_get s p
- let rec enum_count l () =
+ let enum_count l () =
let rec aux n = function
| E -> n
| C (s, p, m, t) -> aux (n + (STRING.length s - p) + length m) t
in aux 0 !l
- let rec rev_enum_count l () =
+ let rev_enum_count l () =
let rec aux n = function
| E -> n
| C (s, p, m, t) -> aux (n + (p + 1) + length m) t
View
@@ -61,7 +61,7 @@ let (|>) x f = f x
let enum_print_limit = ref 20
let enum_print p oc e =
let e = BatEnum.clone e in
- for i = 1 to !enum_print_limit-1 do
+ for _i = 1 to !enum_print_limit-1 do
match BatEnum.get e with
| None -> ()
| Some x -> p oc x; BatIO.write oc ' '

0 comments on commit c11775f

Please sign in to comment.