aboutsummaryrefslogtreecommitdiff
path: root/tactics
diff options
context:
space:
mode:
authorHugo Herbelin2018-07-28 22:11:52 +0200
committerHugo Herbelin2018-07-28 22:11:52 +0200
commit231f679965745a4d7677166e8d5f62a38ebde4e7 (patch)
tree19a15e1bdb297e4246b3d9c638a590b2954e3039 /tactics
parentbcde7ca41b1e444b04559baed62afda3a3ab5d09 (diff)
parentec0e4eb918fc6d95abd5f92b9bea0464662e7245 (diff)
Merge PR #8077: Fix #7291: unify tactic should have more descriptive error messages.
Diffstat (limited to 'tactics')
-rw-r--r--tactics/tactics.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/tactics/tactics.ml b/tactics/tactics.ml
index 5fc34619e8..2a8ebe08ca 100644
--- a/tactics/tactics.ml
+++ b/tactics/tactics.ml
@@ -5063,6 +5063,7 @@ let constr_eq ~strict x y =
let unify ?(state=full_transparent_state) x y =
Proofview.Goal.enter begin fun gl ->
+ let env = Proofview.Goal.env gl in
let sigma = Proofview.Goal.sigma gl in
try
let core_flags =
@@ -5078,7 +5079,7 @@ let unify ?(state=full_transparent_state) x y =
let sigma = w_unify (Tacmach.New.pf_env gl) sigma Reduction.CONV ~flags x y in
Proofview.Unsafe.tclEVARS sigma
with e when CErrors.noncritical e ->
- Tacticals.New.tclFAIL 0 (str"Not unifiable")
+ Proofview.tclZERO (PretypeError (env, sigma, CannotUnify (x, y, None)))
end
module Simple = struct