aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMaxime Dénès2017-10-03 11:45:31 +0200
committerMaxime Dénès2017-10-03 11:45:31 +0200
commitafe519db64b4864b5a901ab96a1e4297e9316b14 (patch)
tree9fe22a04fcfd049081dedb6f9262a3a321176d03 /kernel
parente33cd69ab6fcb38478a6c0e00628a5de16181906 (diff)
parentb772c323f62b322c9b0a4ab90c7de8b1e2066bae (diff)
Merge PR #1040: Efficient fresh name generation
Diffstat (limited to 'kernel')
-rw-r--r--kernel/environ.ml2
-rw-r--r--kernel/environ.mli1
2 files changed, 3 insertions, 0 deletions
diff --git a/kernel/environ.ml b/kernel/environ.ml
index 621a9931de..c3fd8962e6 100644
--- a/kernel/environ.ml
+++ b/kernel/environ.ml
@@ -101,6 +101,8 @@ let fold_rel_context f env ~init =
let named_context_of_val c = c.env_named_ctx
+let ids_of_named_context_val c = Id.Map.domain c.env_named_map
+
(* [map_named_val f ctxt] apply [f] to the body and the type of
each declarations.
*** /!\ *** [f t] should be convertible with t *)
diff --git a/kernel/environ.mli b/kernel/environ.mli
index 377c61de2c..2667ad7ca9 100644
--- a/kernel/environ.mli
+++ b/kernel/environ.mli
@@ -80,6 +80,7 @@ val fold_rel_context :
val named_context_of_val : named_context_val -> Context.Named.t
val val_of_named_context : Context.Named.t -> named_context_val
val empty_named_context_val : named_context_val
+val ids_of_named_context_val : named_context_val -> Id.Set.t
(** [map_named_val f ctxt] apply [f] to the body and the type of