aboutsummaryrefslogtreecommitdiff
path: root/lib/util.ml
diff options
context:
space:
mode:
authorfilliatr1999-10-20 20:41:08 +0000
committerfilliatr1999-10-20 20:41:08 +0000
commitd18d82c9e58567384ea632c77a5c1531f6d534cb (patch)
tree88b97805630eee3205aad0e818030158fbf7903d /lib/util.ml
parenta8972eb35ab1020ed9a379811c372fae53deef41 (diff)
- documentation repertoire proofs/
- IsAppL of constr * constr list ==> répercussion - module Clenv (suite; as terminé) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@113 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/util.ml')
-rw-r--r--lib/util.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/util.ml b/lib/util.ml
index 62a86b55f5..0206bf887d 100644
--- a/lib/util.ml
+++ b/lib/util.ml
@@ -278,8 +278,17 @@ type ('a,'b) union = Inl of 'a | Inr of 'b
module Intset = Set.Make(struct type t = int let compare = compare end)
+let intset_exists p s = Intset.fold (fun x b -> (p x) || b) s false
+
module Intmap = Map.Make(struct type t = int let compare = compare end)
+let intmap_in_dom x m =
+ try let _ = Intmap.find x m in true with Not_found -> false
+
+let intmap_to_list m = Intmap.fold (fun n v l -> (n,v)::l) m []
+
+let intmap_inv m b = Intmap.fold (fun n v l -> if v = b then n::l else l) m []
+
let out_some = function
| Some x -> x
| None -> failwith "out_some"