aboutsummaryrefslogtreecommitdiff
path: root/lib/util.ml
diff options
context:
space:
mode:
authorherbelin2007-04-28 13:56:03 +0000
committerherbelin2007-04-28 13:56:03 +0000
commit27ea35bafdf0aefe1dcf49dfed1a18c3f158efa5 (patch)
tree36e033096a8f42fe4e2d2ff15647799e6495bfa9 /lib/util.ml
parentef486799ac73c533e0a5b5cdd2662eb68a2636cb (diff)
Ajout de la possibilité de faire référence dans certains cas à un nom
par sa notation (p.ex. pour unfold ou pour lazy delta). Ex: Goal 3+4 = 7. unfold "+". git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9804 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/util.ml')
-rw-r--r--lib/util.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/util.ml b/lib/util.ml
index ee373120e2..8b3fb2428b 100644
--- a/lib/util.ml
+++ b/lib/util.ml
@@ -778,6 +778,11 @@ let option_smartmap f a = match a with
| None -> a
| Some x -> let x' = f x in if x'==x then a else Some x'
+let rec filter_some = function
+ | [] -> []
+ | None::l -> filter_some l
+ | Some a::l -> a :: filter_some l
+
let map_succeed f =
let rec map_f = function
| [] -> []