Debian Codegraph @

test-suite/success/uniform_inductive_parameters.v

raw
1 Set Uniform Inductive Parameters.
2
3 Inductive list (A : Type) :=
4 | nil : list
5 | cons : A -> list -> list.
6 Check (list : Type -> Type).
7 Check (cons : forall A, A -> list A -> list A).
8
9 Inductive list2 (A : Type) (A' := prod A A) :=
10 | nil2 : list2
11 | cons2 : A' -> list2 -> list2.
12 Check (list2 : Type -> Type).
13 Check (cons2 : forall A (A' := prod A A), A' -> list2 A -> list2 A).
14
15 Inductive list3 | A := nil3 | cons3 : A -> list3 (A * A)%type -> list3 A.
16
17 Unset Uniform Inductive Parameters.
18
19 Inductive list4 A | := nil4 | cons4 : A -> list4 -> list4.
20
21 Inductive Acc {A:Type} (R:A->A->Prop) | (x:A) : Prop
22 := Acc_in : (forall y, R y x -> Acc y) -> Acc x.