diff options
| author | Enrico Tassi | 2021-03-19 12:27:14 +0100 |
|---|---|---|
| committer | Enrico Tassi | 2021-04-07 19:59:46 +0200 |
| commit | b47931125432df88171c7e8a879294508a603aa9 (patch) | |
| tree | 64dca669a00da9d64f1ad687e9f18c65b69ec3c0 /interp/constrexpr_ops.ml | |
| parent | 59d0462f35818c12a0727a560d7b9ecf2ceea994 (diff) | |
cleanup: less exceptions, removal of try_interp_name_alias
Diffstat (limited to 'interp/constrexpr_ops.ml')
| -rw-r--r-- | interp/constrexpr_ops.ml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/interp/constrexpr_ops.ml b/interp/constrexpr_ops.ml index f02874253e..e72b73c36e 100644 --- a/interp/constrexpr_ops.ml +++ b/interp/constrexpr_ops.ml @@ -283,10 +283,13 @@ let local_binders_loc bll = match bll with (** Folds and maps *) let is_constructor id = - try Globnames.isConstructRef - (Smartlocate.global_of_extended_global - (Nametab.locate_extended (qualid_of_ident id))) - with Not_found -> false + match + Smartlocate.global_of_extended_global + (Nametab.locate_extended (qualid_of_ident id)) + with + | exception Not_found -> false + | None -> false + | Some gref -> Globnames.isConstructRef gref let rec cases_pattern_fold_names f h nacc pt = match CAst.(pt.v) with | CPatRecord l -> |
