aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/util.ml
diff options
context:
space:
mode:
authorGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-02-14 09:15:15 +0000
committerGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-02-14 09:15:15 +0000
commite4c7ad09b0be022a59760d78cc382687294c9350 (patch)
treeb14654a6c6106a9f27b388e0cd65509a7c77a82c /lib/util.ml
parent77b0b252f3ce600e1c70e613af878e74439a585b (diff)
- Fix treatment of globality flag for typeclass instance hints (they
were all declared as global). - Add possibility to remove hints (Resolve or Immediate only) based on the name of the lemma. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13842 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 fb271ea42..a8e716e0f 100644
--- a/lib/util.ml
+++ b/lib/util.ml
@@ -488,6 +488,15 @@ let list_map4 f l1 l2 l3 l4 =
in
map (l1,l2,l3,l4)
+let rec list_smartfilter f l = match l with
+ [] -> l
+ | h::tl ->
+ let tl' = list_smartfilter f tl in
+ if f h then
+ if tl' == tl then l
+ else h :: tl'
+ else tl'
+
let list_index x =
let rec index_x n = function
| y::l -> if x = y then n else index_x (succ n) l