aboutsummaryrefslogtreecommitdiff
path: root/engine/termops.ml
diff options
context:
space:
mode:
authorHugo Herbelin2020-11-14 16:14:48 +0100
committerHugo Herbelin2020-11-24 15:29:16 +0100
commit47910007a9eff37c9f364a269b46874165711abf (patch)
tree6d9a6cc4b77840ea045e6c5d68d7c5c1cd152484 /engine/termops.ml
parent90cb2b0daf54cbd72c5ac8e1ffe2007c8901ddba (diff)
Add a new evar source to refer to evars which are types of evars.
To tie the knot (since the evar depends on the evar type and the source of the evar type of the evar), we use an "update_source" function. An alternative could be to provide a function to build both an evar with its evar type directly in evd.ml...
Diffstat (limited to 'engine/termops.ml')
-rw-r--r--engine/termops.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/engine/termops.ml b/engine/termops.ml
index 693945d5ac..ccd49ca495 100644
--- a/engine/termops.ml
+++ b/engine/termops.ml
@@ -123,6 +123,13 @@ let pr_evar_source env sigma = function
str "subterm of pattern-matching return predicate"
| Evar_kinds.BinderType (Name id) -> str "type of " ++ Id.print id
| Evar_kinds.BinderType Anonymous -> str "type of anonymous binder"
+ | Evar_kinds.EvarType (ido,evk) ->
+ let pp = match ido with
+ | Some id -> str "?" ++ Id.print id
+ | None ->
+ try pr_existential_key sigma evk
+ with (* defined *) Not_found -> str "an internal placeholder" in
+ str "type of " ++ pp
| Evar_kinds.ImplicitArg (c,(n,ido),b) ->
let open Globnames in
let print_constr = print_kconstr in