Debian Codegraph @

test-suite/bugs/bug_13157.v

raw
1 Generalizable Variable A.
2 Implicit Type A : Type.
3
4 Definition works2344 : forall `(l : list A) (l' : list A), unit :=
5 fix flist `(l : list A) (l' : list A) {struct l'} := tt.
6 Check eq_refl : @works2344 = (fix flist A l l' {struct l'} := tt).
7
8 Definition fails : forall `(l: list A), unit :=
9 fix flist `(l : list A) {struct l} := tt.
10 Check eq_refl : @fails = (fix flist A l {struct l} := tt).
11 (*
12 Error:
13 Recursive definition of flist is ill-formed.
14 In environment
15 flist : forall A : Type, list A -> unit
16 Recursive definition on "Type"
17 which should be a recursive inductive type.
18 Recursive definition is: "fun (A : Type) (_ : list A) => tt".
19 *)
20
21 Definition fails2
22 : forall `(l : list A) (l' : list A), unit :=
23 fix flist `(l : list A) (l' : list A) {struct l} := tt.
24 Check eq_refl : @fails2 = (fix flist A l l' {struct l} := tt).