aboutsummaryrefslogtreecommitdiff
path: root/interp/constrexpr_ops.ml
diff options
context:
space:
mode:
Diffstat (limited to 'interp/constrexpr_ops.ml')
-rw-r--r--interp/constrexpr_ops.ml11
1 files changed, 7 insertions, 4 deletions
diff --git a/interp/constrexpr_ops.ml b/interp/constrexpr_ops.ml
index 40fe13784a..ddd689bee0 100644
--- a/interp/constrexpr_ops.ml
+++ b/interp/constrexpr_ops.ml
@@ -281,10 +281,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 ->