diff options
| author | Enrico Tassi | 2020-05-05 10:21:21 +0200 |
|---|---|---|
| committer | Enrico Tassi | 2020-05-05 10:21:21 +0200 |
| commit | 64ce136a5fb2eb1d3b620889b2047fda82694849 (patch) | |
| tree | d2c783b0fdfbd93c45f8fe90a52ac9c0ab4b6ab9 | |
| parent | 6678c067abac278554ab205ab18315d30202a369 (diff) | |
[ssr] wrap a couple of exception with tclLIFT
| -rw-r--r-- | plugins/ssr/ssrcommon.ml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/ssr/ssrcommon.ml b/plugins/ssr/ssrcommon.ml index 06b26b28fd..e05c4c26dd 100644 --- a/plugins/ssr/ssrcommon.ml +++ b/plugins/ssr/ssrcommon.ml @@ -1500,14 +1500,17 @@ end let tacMK_SSR_CONST name = Proofview.tclENV >>= fun env -> Proofview.tclEVARMAP >>= fun sigma -> - let sigma, c = mkSsrConst name env sigma in - Unsafe.tclEVARS sigma <*> - tclUNIT c + match mkSsrConst name env sigma with + | sigma, c -> Unsafe.tclEVARS sigma <*> tclUNIT c + | exception e when CErrors.noncritical e -> + tclLIFT (Proofview.NonLogical.raise (e, Exninfo.null)) let tacDEST_CONST c = Proofview.tclEVARMAP >>= fun sigma -> - let c, _ = EConstr.destConst sigma c in - tclUNIT c + match EConstr.destConst sigma c with + | c, _ -> tclUNIT c + | exception e when CErrors.noncritical e -> + tclLIFT (Proofview.NonLogical.raise (e, Exninfo.null)) (* TASSI: This version of unprotects inlines the unfold tactic definition, * since we don't want to wipe out let-ins, and it seems there is no flag |
