aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-06-09 14:17:25 +0200
committerPierre-Marie Pédrot2020-06-19 15:56:56 +0200
commit9ad3bb77445de870eecf006941779c78531512e5 (patch)
tree23e063fee291070bd6e71566f70cae5f20e59523 /kernel
parent33e763a441022623621536766ac38c3021dcb65c (diff)
Do not reallocate named_context_val of the pretyping environment.
Instead of costly linear reallocations, we share as much as possible of the prefixes of the various environment subcomponents.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/environ.mli2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/environ.mli b/kernel/environ.mli
index 79e632daa0..f489b13a3b 100644
--- a/kernel/environ.mli
+++ b/kernel/environ.mli
@@ -176,6 +176,8 @@ val named_body : variable -> env -> constr option
val fold_named_context :
(env -> Constr.named_declaration -> 'a -> 'a) -> env -> init:'a -> 'a
+val match_named_context_val : named_context_val -> (named_declaration * lazy_val * named_context_val) option
+
(** Recurrence on [named_context] starting from younger decl *)
val fold_named_context_reverse :
('a -> Constr.named_declaration -> 'a) -> init:'a -> env -> 'a