aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/complexity
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-12-16 15:09:02 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-12-16 15:09:02 +0000
commitec60cad947dc4267f0545626b4ec7145f19f3ee3 (patch)
tree4b0c4623141cfccc90ca7c2ed1b67c92918972ab /test-suite/complexity
parent3c4e47b7e829ce7fac8aad85c1a1fd2fce655075 (diff)
Fixing amazing loop when using eta-expansion in pattern-matching for
printing notations. Since notation printing is not typed, printing "F G" using a notation for "f (fun x => g)" recursively eta-expands G, then x, then a new x and so on forever. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14796 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite/complexity')
-rw-r--r--test-suite/complexity/Notations.v10
1 files changed, 10 insertions, 0 deletions
diff --git a/test-suite/complexity/Notations.v b/test-suite/complexity/Notations.v
new file mode 100644
index 000000000..d36d77d57
--- /dev/null
+++ b/test-suite/complexity/Notations.v
@@ -0,0 +1,10 @@
+(* Last line should not loop, even in the presence of eta-expansion in the *)
+(* printing mechanism *)
+(* Expected time < 1.00s *)
+
+Notation "'bind' x <- y ; z" :=(y (fun x => z)) (at level 99, x at
+ level 0, y at level 0,format "'[hv' 'bind' x <- y ; '/' z ']'").
+
+Definition f (g : (nat -> nat) -> nat) := g (fun x => 0).
+
+Check (fun g => f g).