diff options
| author | Pierre-Marie Pédrot | 2021-04-23 16:33:27 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2021-04-23 16:33:27 +0200 |
| commit | a0c3ebf4a6357a5140b98b4b40c71133c53d802e (patch) | |
| tree | e01a7875d5e2a608d3c3f06022bdf037d376c713 /interp/constrexpr_ops.ml | |
| parent | 7e576aef5b41837c7faa72a5525ee41bec02babb (diff) | |
| parent | b57538ade048f55b657a8d5642ee08e6e4291126 (diff) | |
Merge PR #13965: [abbreviation] user syntax to set interp scope of argument
Ack-by: JasonGross
Reviewed-by: herbelin
Reviewed-by: jashug
Reviewed-by: jfehrle
Reviewed-by: ppedrot
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 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 -> |
