Debian Codegraph @

test-suite/bugs/bug_11039.v

raw
1 (* this bug was a proof of False *)
2
3 Set Warnings "+no-template-universe".
4
5 (* when we require template poly Coq recognizes that it's not allowed *)
6 Fail #[universes(template)]
7 Inductive foo@{i} (A:Type@{i}) : Type@{i+1} := bar (X:Type@{i}) : foo A.
8
9 (* variants with letin *)
10 Fail #[universes(template)]
11 Inductive foo@{i} (T:=Type@{i}:Type@{i+1}) (A:Type@{i}) : Type@{i+1} := bar (X:T) : foo A.
12
13 Fail #[universes(template)]
14 Record foo@{i} (T:=Type@{i}:Type@{i+1}) (A:Type@{i}) : Type@{i+1} := bar { X:T }.
15
16
17 (* no implicit template poly, no explicit universe annotations *)
18 Inductive foo (A:Type) := bar X : foo X -> foo A | nonempty.
19 Arguments nonempty {_}.
20
21 Fail Check foo nat : Type@{foo.u0}.
22 (* template poly didn't activate *)
23
24 Definition U := Type.
25 Definition A : U := foo nat.
26
27 Fail Definition down : U -> A := fun u => bar nat u nonempty.
28 (* this is the one where it's important that it fails *)