Debian Codegraph @

test-suite/bugs/bug_4375.v

raw
1
2
3 Polymorphic Fixpoint g@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
4 t.
5
6
7 Module A.
8 Polymorphic Fixpoint foo@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
9 match n with
10 | 0 => t
11 | S n => bar t n
12 end
13
14 with bar (t : Type@{i}) (n : nat) : Type@{i} :=
15 match n with
16 | 0 => t
17 | S n => foo t n
18 end.
19 End A.
20
21 Module B.
22 Polymorphic Fixpoint foo@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
23 match n with
24 | 0 => t
25 | S n => bar t n
26 end
27
28 with bar@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
29 match n with
30 | 0 => t
31 | S n => foo t n
32 end.
33 End B.
34
35 Module C.
36 Fail Polymorphic Fixpoint foo@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
37 match n with
38 | 0 => t
39 | S n => bar t n
40 end
41
42 with bar@{j} (t : Type@{j}) (n : nat) : Type@{j} :=
43 match n with
44 | 0 => t
45 | S n => foo t n
46 end.
47 End C.
48
49 Module D.
50 Polymorphic Fixpoint foo@{i j} (t : Type@{i}) (n : nat) : Type@{i} :=
51 match n with
52 | 0 => t
53 | S n => bar t n
54 end
55
56 with bar@{i j} (t : Type@{j}) (n : nat) : Type@{j} :=
57 match n with
58 | 0 => t
59 | S n => foo t n
60 end.
61 End D.
62
63 Module E.
64 Fail Polymorphic Fixpoint foo@{i j} (t : Type@{i}) (n : nat) : Type@{i} :=
65 match n with
66 | 0 => t
67 | S n => bar t n
68 end
69
70 with bar@{j i} (t : Type@{j}) (n : nat) : Type@{j} :=
71 match n with
72 | 0 => t
73 | S n => foo t n
74 end.
75 End E.
76
77 (*
78 Polymorphic Fixpoint g@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
79 t.
80
81 Print g.
82
83 Polymorphic Fixpoint a@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
84 t
85 with b@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
86 t.
87
88 Print a.
89 Print b.
90 *)
91
92 Polymorphic CoInductive foo@{i} (T : Type@{i}) : Type@{i} :=
93 | A : foo T -> foo T.
94
95 Polymorphic CoFixpoint cg@{i} (t : Type@{i}) : foo@{i} t :=
96 @A@{i} t (cg t).
97
98 Print cg.
99
100 Polymorphic CoFixpoint ca@{i} (t : Type@{i}) : foo@{i} t :=
101 @A@{i} t (cb t)
102 with cb@{i} (t : Type@{i}) : foo@{i} t :=
103 @A@{i} t (ca t).
104
105 Print ca.
106 Print cb.