aboutsummaryrefslogtreecommitdiff
path: root/interp/notation_ops.ml
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2018-10-23 23:12:49 +0200
committerEmilio Jesus Gallego Arias2018-10-23 23:12:49 +0200
commit3dd46db42776f9be448454b2ddf556663295abd8 (patch)
treeb26d860afadee6d8935f6367cd3117a175930b42 /interp/notation_ops.ml
parentfac034c9660e3896a8b983ba60c0f5a6f09ee60a (diff)
parentc76fbecdfe4231ee3e0753c0efe665b1e8a8bba5 (diff)
Merge PR #8806: Fixing #8794: anomaly with abbreviation binding both a term and a binder
Diffstat (limited to 'interp/notation_ops.ml')
-rw-r--r--interp/notation_ops.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/interp/notation_ops.ml b/interp/notation_ops.ml
index ab57176643..7a525f84a5 100644
--- a/interp/notation_ops.ml
+++ b/interp/notation_ops.ml
@@ -892,7 +892,9 @@ let bind_term_as_binding_env alp (terms,termlists,binders,binderlists as sigma)
| GVar id' ->
(if not (Id.equal id id') then (fst alp,(id,id')::snd alp) else alp),
sigma
- | _ -> anomaly (str "A term which can be a binder has to be a variable.")
+ | t ->
+ (* The term is a non-variable pattern *)
+ raise No_match
with Not_found ->
(* The matching against a term allowing to find the instance has not been found yet *)
(* If it will be a different name, we shall unfortunately fail *)