Silence several warnings (missing _ in records, unused variables).
authorKim Nguyễn <kn@lri.fr>
Tue, 5 Mar 2013 00:35:44 +0000 (01:35 +0100)
committerKim Nguyễn <kn@lri.fr>
Tue, 5 Mar 2013 00:42:21 +0000 (01:42 +0100)
src/auto/ata.ml
src/tree/naive.ml
src/utils/finiteCofinite.ml
src/utils/pretty.ml
src/utils/ptset.ml

index e07aa3f..576941d 100644 (file)
@@ -14,7 +14,7 @@
 (***********************************************************************)
 
 (*
-  Time-stamp: <Last modified on 2013-03-04 18:18:37 CET by Kim Nguyen>
+  Time-stamp: <Last modified on 2013-03-04 23:39:48 CET by Kim Nguyen>
 *)
 
 INCLUDE "utils.ml"
@@ -157,7 +157,7 @@ let print fmt a =
       a.transitions
       []
   in
-  let sorted_trs = List.stable_sort (fun (q1, s1, phi1) (q2, s2, phi2) ->
+  let sorted_trs = List.stable_sort (fun (q1, s1, _) (q2, s2, _) ->
     let c = State.compare q1 q2 in - (if c == 0 then QNameSet.compare s1 s2 else c))
     trs
   in
index cff6ee2..37683f3 100644 (file)
@@ -14,7 +14,7 @@
 (***********************************************************************)
 
 (*
-  Time-stamp: <Last modified on 2013-03-04 21:59:38 CET by Kim Nguyen>
+  Time-stamp: <Last modified on 2013-03-04 23:40:26 CET by Kim Nguyen>
 *)
 open Utils
 
@@ -142,7 +142,7 @@ struct
     if n.next_sibling != dummy then
       let _ = pop ctx in consume_closing ctx (top ctx)
 
-  and end_element_handler parser_ ctx tag =
+  and end_element_handler parser_ ctx _ =
     do_text parser_ ctx;
     let node = top ctx in
     if node.first_child == dummy then node.first_child <- nil
@@ -162,7 +162,7 @@ struct
 
 
 
-  let character_data_handler parser_ ctx text =
+  let character_data_handler _parser ctx text =
     Buffer.add_string ctx.text_buffer text
 
   let create_parser () =
index 8d3c3ee..8fcf33d 100644 (file)
@@ -14,7 +14,7 @@
 (***********************************************************************)
 
 (*
-  Time-stamp: <Last modified on 2013-01-30 19:09:01 CET by Kim Nguyen>
+  Time-stamp: <Last modified on 2013-03-05 00:35:26 CET by Kim Nguyen>
 *)
 
 INCLUDE "utils.ml"
@@ -34,9 +34,9 @@ struct
     type t = node
     let equal a b =
       match a, b with
-        Finite (s1), Finite (s2)
-      | CoFinite (s1), CoFinite (s2) -> E.equal s1 s2
-      | _ -> false
+        Finite s1, Finite s2
+      | CoFinite s1, CoFinite s2 -> E.equal s1 s2
+      | (Finite _| CoFinite _), _ -> false
 
     let hash = function
       | Finite s -> HASHINT2 (PRIME1, E.hash s)
@@ -48,20 +48,21 @@ struct
   let finite x = make (Finite x)
   let cofinite x = make (CoFinite x)
 
-  let is_empty =  function
-    | { node = Finite s } when E.is_empty s -> true
-    | _ -> false
+  let is_empty t =  match t.node with
+    | Finite s -> E.is_empty s
+    | CoFinite _  -> false
 
-  let is_any = function
-    | { node = CoFinite s } when E.is_empty s -> true
-    | _ -> false
+  let is_any t = match t.node with
+    | CoFinite s -> E.is_empty s
+    | Finite _  -> false
 
   let is_finite t = match t.node with
-    | Finite _ -> true | _ -> false
+    | Finite _ -> true
+    | CoFinite _ -> false
 
   let kind t = match t.node with
     | Finite _ -> `Finite
-    | _ -> `Cofinite
+    | CoFinite _  -> `Cofinite
 
   let mem x t = match t.node with
     | Finite s -> E.mem x s
@@ -124,17 +125,17 @@ struct
 
     let rec next_finite_cofinite facc cacc = function
       | [] -> finite facc, cofinite (E.diff cacc facc)
-      | { node = Finite s } ::r ->
+      | { node = Finite s; _ } ::r ->
         next_finite_cofinite (E.union s facc) cacc r
-      | { node = CoFinite _ } ::r when E.is_empty cacc ->
+      | { node = CoFinite _ ; _ } ::r when E.is_empty cacc ->
         next_finite_cofinite facc cacc r
-      | { node = CoFinite s } ::r ->
+      | { node = CoFinite s; _ } ::r ->
         next_finite_cofinite facc (E.inter cacc s) r
     in
     let rec first_cofinite facc = function
       | [] -> empty,empty
-      | { node = Finite s } :: r-> first_cofinite (E.union s facc) r
-      | { node = CoFinite s } :: r -> next_finite_cofinite facc s r
+      | { node = Finite s ; _ } :: r-> first_cofinite (E.union s facc) r
+      | { node = CoFinite s ; _ } :: r -> next_finite_cofinite facc s r
     in
       first_cofinite E.empty l
 
@@ -177,42 +178,40 @@ struct
 
   let choose t = match t.node with
       Finite s -> E.choose s
-    | _ -> raise exn
+    | CoFinite _ -> raise exn
 
   let is_singleton t = match t.node with
     | Finite s -> E.is_singleton s
-    | _ -> false
+    | CoFinite _ -> false
 
   let intersect s t = match s.node, t.node with
     | Finite s, Finite t -> E.intersect s t
     | CoFinite s, Finite t -> not (E.subset t s)
     | Finite s, CoFinite t -> not (E.subset s t)
-    | CoFinite s, CoFinite t -> true
+    | CoFinite _ , CoFinite _ -> true
 
   let split x s = match s.node with
     | Finite s ->
       let s1, b, s2 = E.split x s in
       finite s1, b, finite s2
 
-    | _ -> raise exn
+    | CoFinite _ -> raise exn
 
   let min_elt s = match s.node with
     | Finite s -> E.min_elt s
-    | _ -> raise exn
+    | CoFinite _ -> raise exn
 
   let max_elt s = match s.node with
     | Finite s -> E.min_elt s
-    | _ -> raise exn
+    | CoFinite _ -> raise exn
 
-  let positive t =
-    match t.node with
+  let positive t = match t.node with
       | Finite x -> x
-      | _ -> E.empty
+      | CoFinite _ -> E.empty
 
-  let negative t =
-    match t.node with
+  let negative t = match t.node with
       | CoFinite x -> x
-      | _ -> E.empty
+      | Finite _ -> E.empty
 
   let inj_positive t = finite t
   let inj_negative t = cofinite t
index a7434b1..1255b7b 100644 (file)
@@ -14,7 +14,7 @@
 (***********************************************************************)
 
 (*
-  Time-stamp: <Last modified on 2013-03-04 18:46:09 CET by Kim Nguyen>
+  Time-stamp: <Last modified on 2013-03-04 23:39:28 CET by Kim Nguyen>
 *)
 
 open Format
@@ -124,7 +124,7 @@ let pp_underline = ppf underline
 let pp_strike = ppf strike
 let pp_subscript = ppf subscript
 let pp_superscript = ppf superscript
-let dummy_printer fmt () = ()
+let dummy_printer _ () = ()
 
 let pp_print_list ?(sep=dummy_printer) printer fmt l =
   match l with
index ee0370a..68876d4 100644 (file)
@@ -15,7 +15,7 @@
 (***********************************************************************)
 
 (*
-  Time-stamp: <Last modified on 2013-01-30 19:07:53 CET by Kim Nguyen>
+  Time-stamp: <Last modified on 2013-03-05 00:37:22 CET by Kim Nguyen>
 *)
 
 (* Modified by Kim Nguyen *)
@@ -52,7 +52,7 @@ struct
       | Branch(b1,i1,l1,r1), Branch(b2,i2,l2,r2) ->
           b1 == b2 && i1 == i2 && (Node.equal l1 l2) && (Node.equal r1 r2)
 
-      | _ -> false
+      | (Empty|Leaf _|Branch _), _  -> false
 
     let hash = function
     | Empty -> 0
@@ -84,8 +84,9 @@ struct
   let singleton k = leaf k
 
   let is_singleton n =
-    match Node.node n with Leaf _ -> true
-    | _ -> false
+    match Node.node n with
+      | Leaf _ -> true
+      | Branch _ | Empty -> false
 
   let mem (k:elt) n =
     let kid = Uid.to_int (H.uid k) in