aboutsummaryrefslogtreecommitdiffhomepage
path: root/engine/evarutil.ml
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-05-24 21:55:21 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-05-30 15:08:22 +0200
commitbbde815f8108f4641f5411d03f7a88096cc2221b (patch)
treebc46ccddc767bb65bf836fd978b5779d4b2e3d78 /engine/evarutil.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/evarutil.ml')
-rw-r--r--engine/evarutil.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/evarutil.ml b/engine/evarutil.ml
index 6cba6f607..3ef725cbb 100644
--- a/engine/evarutil.ml
+++ b/engine/evarutil.ml
@@ -367,10 +367,10 @@ let push_rel_context_to_named_context env sigma typ =
let default_source = Loc.tag @@ Evar_kinds.InternalHole
-let restrict_evar evd evk filter candidates =
+let restrict_evar evd evk filter ?src candidates =
let evd = Sigma.to_evar_map evd in
let candidates = Option.map (fun l -> List.map EConstr.Unsafe.to_constr l) candidates in
- let evd, evk' = Evd.restrict evk filter ?candidates evd in
+ let evd, evk' = Evd.restrict evk filter ?candidates ?src evd in
Sigma.Unsafe.of_pair (evk', Evd.declare_future_goal evk' evd)
let new_pure_evar_full evd evi =