From 4e18be02a03ab478125aa6f08b30e738c3568572 Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Fri, 23 Feb 2018 14:12:12 +0100 Subject: 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. --- test-suite/output/bug6821.out | 2 ++ test-suite/output/bug6821.v | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 test-suite/output/bug6821.out create mode 100644 test-suite/output/bug6821.v (limited to 'test-suite') diff --git a/test-suite/output/bug6821.out b/test-suite/output/bug6821.out new file mode 100644 index 000000000..7b12b5320 --- /dev/null +++ b/test-suite/output/bug6821.out @@ -0,0 +1,2 @@ +forall f : nat -> Type, f x where x : nat := 1 + : Type diff --git a/test-suite/output/bug6821.v b/test-suite/output/bug6821.v new file mode 100644 index 000000000..40627e331 --- /dev/null +++ b/test-suite/output/bug6821.v @@ -0,0 +1,8 @@ +(* Was failing at printing time with stack overflow due to an infinite + eta-expansion *) + +Notation "x 'where' y .. z := v " := + ((fun y => .. ((fun z => x) v) ..) v) + (at level 11, v at next level, y binder, z binder). + +Check forall f, f x where x := 1. -- cgit v1.2.3