diff options
| author | Pierre-Marie Pédrot | 2018-07-16 14:07:01 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2018-07-16 14:07:01 +0200 |
| commit | 0a00445b113d61a82613f1ba641454b76bd6387c (patch) | |
| tree | 375577e6784e67fa3a384f801d049458364a73fe | |
| parent | e27d2fd32e40937e48889772361f1cf53dd9c48e (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.ml | 3 |
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 |
