Debian Codegraph @

test-suite/output/DebugRelevances.v

raw
1
2 Set Universe Polymorphism.
3 Set Printing Relevance Marks.
4
5 Definition foo (A:Type) (a:A) := a.
6 Definition foo' (A:Prop) (a:A) := a.
7 Definition bar (A:SProp) (a:A) := a.
8 Definition baz@{s;u|} (A:Type@{s;u}) (a:A) := a.
9
10 Definition hide@{s;u|} {A:Type@{s;u}} := A.
11 Definition boz@{s s';u|} (A:Type@{s;u}) (B:Type@{s';u}) (a:@hide A) (b:@hide B) := a.
12
13 Print foo.
14 Print foo'.
15 Print bar.
16 Print baz.
17
18 (* arguments a and b are printed separately because they have different relevances
19 even though the types are printed the same (difference hidden by implicit arguments) *)
20 Print boz.
21
22 Inductive sFalse : SProp := .
23
24 Goal True.
25 Unset Printing Notations. (* arrow notation has no binder so relevance isn't printed *)
26 pose (f:=fun A (a:A) => A).
27 Show.
28 let _ := constr:(f nat) in idtac.
29 Show.
30 Abort.
31 Set Printing Notations.
32
33 (* TODO print relevance of letin *)
34 Check let x := 0 in x.
35
36 (* TODO print relevance of fixpoints (should be fix f (* Relevant *) ...) *)
37 Check fix f (n:nat) := 0.
38
39
40 (* TODO print case relevance *)
41 Check match 0 with 0 | _ => 0 end.
42
43 (* TODO print primitive projection relevance *)
44 Set Primitive Projections.
45 Record R := { p : nat }.
46 Check fun v => v.(p).