Debian Codegraph @

test-suite/output/coercions_cs.v

raw
1 Set Warnings "-uniform-inheritance".
2 Set Printing All.
3
4 Module CS.
5
6 Structure foo := { sort :> Type; a : sort }.
7
8 Axiom T1 : Type -> Type.
9 Axiom T2 : Type -> Type.
10 Axiom x : T1 nat.
11
12 Module T1.
13 Axiom f : forall A : foo, T1 (sort A) -> T2 nat.
14 #[canonical] Definition foo_nat := {| sort := nat; a := 1 |}.
15 Coercion f : T1 >-> T2.
16 Check (x : T2 _).
17 End T1.
18
19 Module T2.
20 Axiom f : forall A : foo, T1 (sort A) -> T2 nat.
21 #[canonical] Definition foo_A A x := {| sort := A; a := x |}.
22 Coercion f : T1 >-> T2.
23 Check (f _ x : T2 _).
24 End T2.
25
26 End CS.