diff options
| author | Hugo Herbelin | 2020-11-04 07:30:40 +0100 |
|---|---|---|
| committer | Hugo Herbelin | 2021-04-06 17:40:53 +0200 |
| commit | 9374aeeda2a3bc64774753862eae39a8e8539bb7 (patch) | |
| tree | a639beac7009a5b393c084fe35424a7d448f46fb | |
| parent | 70751719b5adadaa384a18c80cc85a6582c12f4a (diff) | |
One catch-all's missing a noncritical; another is now useless (see 7efaf86).
| -rw-r--r-- | proofs/clenv.ml | 2 | ||||
| -rw-r--r-- | vernac/vernacentries.ml | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/proofs/clenv.ml b/proofs/clenv.ml index 44d3b44077..b529bba3f5 100644 --- a/proofs/clenv.ml +++ b/proofs/clenv.ml @@ -298,7 +298,7 @@ let meta_reducible_instance env evd b = if not is_coerce then irec g else u with Not_found -> u) | Proj (p,c) when isMeta evd c || isCast evd c && isMeta evd (pi1 (destCast evd c)) (* What if two nested casts? *) -> - let m = try destMeta evd c with _ -> destMeta evd (pi1 (destCast evd c)) (* idem *) in + let m = try destMeta evd c with DestKO -> destMeta evd (pi1 (destCast evd c)) (* idem *) in (match try let g, s = Metamap.find m metas in diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml index e8d84a67a3..af40292f18 100644 --- a/vernac/vernacentries.ml +++ b/vernac/vernacentries.ml @@ -1934,10 +1934,9 @@ let vernac_search ~pstate ~atts s gopt r = let open ComSearch in let gopt = query_command_selector gopt in let sigma, env = - match gopt with | None -> - (* 1st goal by default if it exists, otherwise no goal at all *) - (try get_goal_or_global_context ~pstate 1 - with _ -> let env = Global.env () in (Evd.from_env env, env)) + match gopt with + (* 1st goal by default if it exists, otherwise no goal at all *) + | None -> get_goal_or_global_context ~pstate 1 (* if goal selector is given and wrong, then let exceptions be raised. *) | Some g -> get_goal_or_global_context ~pstate g in interp_search env sigma s r |
