diff options
| author | Hugo Herbelin | 2018-07-28 22:11:52 +0200 |
|---|---|---|
| committer | Hugo Herbelin | 2018-07-28 22:11:52 +0200 |
| commit | 231f679965745a4d7677166e8d5f62a38ebde4e7 (patch) | |
| tree | 19a15e1bdb297e4246b3d9c638a590b2954e3039 | |
| parent | bcde7ca41b1e444b04559baed62afda3a3ab5d09 (diff) | |
| parent | ec0e4eb918fc6d95abd5f92b9bea0464662e7245 (diff) | |
Merge PR #8077: Fix #7291: unify tactic should have more descriptive error messages.
| -rw-r--r-- | doc/sphinx/proof-engine/tactics.rst | 2 | ||||
| -rw-r--r-- | tactics/tactics.ml | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/doc/sphinx/proof-engine/tactics.rst b/doc/sphinx/proof-engine/tactics.rst index 306673d9a2..e6bc84365c 100644 --- a/doc/sphinx/proof-engine/tactics.rst +++ b/doc/sphinx/proof-engine/tactics.rst @@ -3979,7 +3979,7 @@ succeeds, and results in an error otherwise. This tactic checks whether its arguments are unifiable, potentially instantiating existential variables. -.. exn:: Not unifiable. +.. exn:: Unable to unify @term with @term. .. tacv:: unify @term @term with @ident 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 |
