aboutsummaryrefslogtreecommitdiff
path: root/engine/proofview.ml
diff options
context:
space:
mode:
authorHugo Herbelin2017-05-24 21:55:21 +0200
committerHugo Herbelin2017-05-30 15:08:22 +0200
commitbbde815f8108f4641f5411d03f7a88096cc2221b (patch)
treebc46ccddc767bb65bf836fd978b5779d4b2e3d78 /engine/proofview.ml
parent5a86aabf4375b5f6f205dd328454748d2bc1217f (diff)
Support for using type information to infer more precise evar sources.
This allows a better control on the name to give to an evar and, in particular, to address the issue about naming produced by "epose proof" in one of the comment of Zimmi48 at PR #248 (see file names.v). Incidentally updating output of Show output test (evar numbers shifted).
Diffstat (limited to 'engine/proofview.ml')
-rw-r--r--engine/proofview.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/engine/proofview.ml b/engine/proofview.ml
index ddfc0e39dd..29bb1ef397 100644
--- a/engine/proofview.ml
+++ b/engine/proofview.ml
@@ -696,6 +696,12 @@ let mark_in_evm ~goal evd content =
let info =
if goal then
{ info with Evd.evar_source = match info.Evd.evar_source with
+ (* Two kinds for goal evars:
+ - GoalEvar (morally not dependent)
+ - VarInstance (morally dependent of some name).
+ This is a heuristic for naming these evars. *)
+ | loc, (Evar_kinds.QuestionMark (_,Names.Name id) |
+ Evar_kinds.ImplicitArg (_,(_,Some id),_)) -> loc, Evar_kinds.VarInstance id
| _, (Evar_kinds.VarInstance _ | Evar_kinds.GoalEvar) as x -> x
| loc,_ -> loc,Evar_kinds.GoalEvar }
else info