aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sign.ml3
-rw-r--r--kernel/sign.mli6
2 files changed, 9 insertions, 0 deletions
diff --git a/kernel/sign.ml b/kernel/sign.ml
index 52af09b5a9..f5d6c3b29f 100644
--- a/kernel/sign.ml
+++ b/kernel/sign.ml
@@ -83,6 +83,9 @@ let map_context f l =
let map_rel_context = map_context
let map_named_context = map_context
+let iter_rel_context f = List.iter (fun (_,b,t) -> f t; option_iter f b)
+let iter_named_context f = List.iter (fun (_,b,t) -> f t; option_iter f b)
+
(* Push named declarations on top of a rel context *)
(* Bizarre. Should be avoided. *)
let push_named_to_rel_context hyps ctxt =
diff --git a/kernel/sign.mli b/kernel/sign.mli
index 052acfdc53..5d34c5ab42 100644
--- a/kernel/sign.mli
+++ b/kernel/sign.mli
@@ -65,6 +65,12 @@ val map_rel_context : (constr -> constr) -> rel_context -> rel_context
(*s Map function of [named_context] *)
val map_named_context : (constr -> constr) -> named_context -> named_context
+(*s Map function of [rel_context] *)
+val iter_rel_context : (constr -> unit) -> rel_context -> unit
+
+(*s Map function of [named_context] *)
+val iter_named_context : (constr -> unit) -> named_context -> unit
+
(*s Term constructors *)
val it_mkLambda_or_LetIn : constr -> rel_context -> constr