aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2018-02-23 14:12:12 +0100
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2018-02-23 14:12:12 +0100
commit4e18be02a03ab478125aa6f08b30e738c3568572 (patch)
treeeb8d91e72cd3f0a8b4b95bccf1efb82c6f97a67a /interp
parent0c5f0afffd37582787f79267d9841259095b7edc (diff)
Fixes #6821 (bug in protecting notation printing from infinite eta-expansion).
More precisely when matching "f t" with "(fun ?x => .. ((fun ?x' => ?y) ?z') ..) ?z" do not allow expansion of f since otherwise, we recursively have to match "f t" with the same pattern.
Diffstat (limited to 'interp')
-rw-r--r--interp/notation_ops.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/interp/notation_ops.ml b/interp/notation_ops.ml
index c65f4785e..9bc41a996 100644
--- a/interp/notation_ops.ml
+++ b/interp/notation_ops.ml
@@ -1132,7 +1132,7 @@ let rec match_ inner u alp metas sigma a1 a2 =
else f1,l1, f2, l2 in
let may_use_eta = does_not_come_from_already_eta_expanded_var f1 in
List.fold_left2 (match_ may_use_eta u alp metas)
- (match_in u alp metas sigma f1 f2) l1 l2
+ (match_hd u alp metas sigma f1 f2) l1 l2
| GLambda (na1,bk1,t1,b1), NLambda (na2,t2,b2) ->
match_extended_binders false u alp metas na1 na2 bk1 t1 (match_in u alp metas sigma t1 t2) b1 b2
| GProd (na1,bk1,t1,b1), NProd (na2,t2,b2) ->