aboutsummaryrefslogtreecommitdiff
path: root/vernac
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2018-03-27 13:34:14 +0200
committerPierre-Marie Pédrot2018-03-27 13:34:14 +0200
commit47ad058a918cb0fa8fef70fd7bd95bcb9ca05ee2 (patch)
treee635d65f22b2b0f67b90ee6dd4ab8f339a4e5947 /vernac
parent01b7de3a673eb89cea61442c4db721aad9520c9f (diff)
parent7fd28dc95e3251a10617ddb6758cc00b8960f954 (diff)
Merge PR #7062: Slightly refining some error messages about unresolvable evars.
Diffstat (limited to 'vernac')
-rw-r--r--vernac/himsg.ml10
1 files changed, 8 insertions, 2 deletions
diff --git a/vernac/himsg.ml b/vernac/himsg.ml
index 249e7893c2..698ee4703a 100644
--- a/vernac/himsg.ml
+++ b/vernac/himsg.ml
@@ -559,15 +559,21 @@ let rec explain_evar_kind env sigma evk ty = function
| Evar_kinds.VarInstance id ->
strbrk "an instance of type " ++ ty ++
str " for the variable " ++ Id.print id
- | Evar_kinds.SubEvar evk' ->
+ | Evar_kinds.SubEvar (where,evk') ->
let evi = Evd.find sigma evk' in
let pc = match evi.evar_body with
| Evar_defined c -> pr_leconstr_env env sigma (EConstr.of_constr c)
| Evar_empty -> assert false in
let ty' = EConstr.of_constr evi.evar_concl in
+ (match where with
+ | Some Evar_kinds.Body -> str "the body of "
+ | Some Evar_kinds.Domain -> str "the domain of "
+ | Some Evar_kinds.Codomain -> str "the codomain of "
+ | None ->
pr_existential_key sigma evk ++ str " of type " ++ ty ++
str " in the partial instance " ++ pc ++
- str " found for " ++ explain_evar_kind env sigma evk'
+ str " found for ") ++
+ explain_evar_kind env sigma evk'
(pr_leconstr_env env sigma ty') (snd evi.evar_source)
let explain_typeclass_resolution env sigma evi k =