aboutsummaryrefslogtreecommitdiff
path: root/interp/notation_ops.ml
diff options
context:
space:
mode:
authorHugo Herbelin2020-09-25 21:41:48 +0200
committerHugo Herbelin2020-10-19 10:19:17 +0200
commit26a456cbf1e8abc5c033090b59892b314d7e7142 (patch)
tree31c8a7d69442d044e9990f781ed53e09247d7949 /interp/notation_ops.ml
parente583be62b74d71b5af159700e3a31f78fec9a7d2 (diff)
Fixing printing part of #13078 (anomaly with binding notations in patterns).
We prevent notations involving binders (i.e. names or patterns) to be used for printing in "match" patterns. The computation is done in "has_no_binders_type", controlling uninterpretation.
Diffstat (limited to 'interp/notation_ops.ml')
-rw-r--r--interp/notation_ops.ml3
1 files changed, 1 insertions, 2 deletions
diff --git a/interp/notation_ops.ml b/interp/notation_ops.ml
index 354809252e..3ea3f3ccff 100644
--- a/interp/notation_ops.ml
+++ b/interp/notation_ops.ml
@@ -1436,9 +1436,8 @@ let reorder_canonically_substitution terms termlists metas =
List.fold_right (fun (x,(scl,typ)) (terms',termlists') ->
match typ with
| NtnTypeConstr -> ((Id.List.assoc x terms, scl)::terms',termlists')
- | NtnTypeBinder _ -> assert false
| NtnTypeConstrList -> (terms',(Id.List.assoc x termlists,scl)::termlists')
- | NtnTypeBinderList -> assert false)
+ | NtnTypeBinder _ | NtnTypeBinderList -> anomaly (str "Unexpected binder in pattern notation."))
metas ([],[])
let match_notation_constr_cases_pattern c (metas,pat) =