diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2010-07-21 16:13:43 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2010-07-21 16:13:43 +0000 |
commit | b6913e056e30f3390e29621d15da57e025d98f97 (patch) | |
tree | d26767c8cb81830134b900bdcf59525dc71b5eb5 /test-suite | |
parent | b93b983a29b542d6fc0cbce6686beea57cdddfd2 (diff) |
Backporting fix to bug #2353 (fixpoint with recursively non-uniform
parameters) to branch 8.2.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13302 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite')
-rw-r--r-- | test-suite/bugs/closed/shouldsucceed/2353.v | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/shouldsucceed/2353.v b/test-suite/bugs/closed/shouldsucceed/2353.v new file mode 100644 index 000000000..b5c45c28c --- /dev/null +++ b/test-suite/bugs/closed/shouldsucceed/2353.v @@ -0,0 +1,12 @@ +(* Are recursively non-uniform params correctly treated? *) +Inductive list (A:nat -> Type) n := cons : A n -> list A (S n) -> list A n. +Inductive term n := app (l : list term n). +Definition term_list := + fix term_size n (t : term n) (acc : nat) {struct t} : nat := + match t with + | app l => + (fix term_list_size n (l : list term n) (acc : nat) {struct l} : nat := + match l with + | cons t q => term_list_size (S n) q (term_size n t acc) + end) n l (S acc) + end. |