aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2018-07-16 14:07:01 +0200
committerPierre-Marie Pédrot2018-07-16 14:07:01 +0200
commit0a00445b113d61a82613f1ba641454b76bd6387c (patch)
tree375577e6784e67fa3a384f801d049458364a73fe
parente27d2fd32e40937e48889772361f1cf53dd9c48e (diff)
Fix #7291: unify tactic should have more descriptive error messages.
We simply reuse the same exception as the pretyper instead of raising the generic failure exception in Tactics.unify.
-rw-r--r--tactics/tactics.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/tactics/tactics.ml b/tactics/tactics.ml
index 928530744a..3a09a0e00e 100644
--- a/tactics/tactics.ml
+++ b/tactics/tactics.ml
@@ -5062,6 +5062,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 =
@@ -5077,7 +5078,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