Debian Codegraph @

test-suite/modules/cumpoly.v

raw
1 Set Universe Polymorphism.
2
3 (** Check that variance subtyping is respected. The signature T is asking for
4 invariance, while M provide an irrelevant implementation, which is deemed
5 legit.
6
7 There is currently no way to go the other way around, so it's not possible
8 to generate a counter-example that should fail with the wrong subtyping.
9 *)
10
11 Module Type T.
12 Parameter t@{i|Set <= i} : Type@{i}.
13 Cumulative Inductive I@{i|Set <= i} : Type@{i} := C : t@{i} -> I.
14 End T.
15
16 Module M : T.
17 Definition t@{i|Set <= i} : Type@{i} := nat.
18 Cumulative Inductive I@{i|Set <= i} : Type@{i} := C : t@{i} -> I.
19 End M.