aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar filliatr <filliatr@85f007b7-540e-0410-9357-904b9bb8a0f7>1999-12-03 09:09:37 +0000
committerGravatar filliatr <filliatr@85f007b7-540e-0410-9357-904b9bb8a0f7>1999-12-03 09:09:37 +0000
commitf20dbafa3e49c35414640e01c3549ad1c802d331 (patch)
tree761e97154851e214a6d6802c9decb977bfa1b07e /lib
parent4318eefacae280fed3a159acfede35c568b2942b (diff)
- global_reference traite des variables
- construct_reference, avec environnement en argument - link de Class - Definition et Check au toplevel git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@193 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
-rw-r--r--lib/util.ml2
-rw-r--r--lib/util.mli1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/util.ml b/lib/util.ml
index e1e524cf4..b96eca3ae 100644
--- a/lib/util.ml
+++ b/lib/util.ml
@@ -65,6 +65,8 @@ let stringmap_dom m = Stringmap.fold (fun s _ l -> s::l) m []
(* Lists *)
+let list_add_set x l = if List.mem x l then l else x::l
+
let list_intersect l1 l2 =
List.filter (fun x -> List.mem x l2) l1
diff --git a/lib/util.mli b/lib/util.mli
index 2060b7375..b26d6a1d7 100644
--- a/lib/util.mli
+++ b/lib/util.mli
@@ -41,6 +41,7 @@ val stringmap_dom : 'a Stringmap.t -> string list
(*s Lists. *)
+val list_add_set : 'a -> 'a list -> 'a list
val list_intersect : 'a list -> 'a list -> 'a list
val list_union : 'a list -> 'a list -> 'a list
val list_unionq : 'a list -> 'a list -> 'a list