Debian Codegraph @

test-suite/output/ltac2_printabout.v

raw
1 Require Import Ltac2.Init.
2
3 Ltac2 @ external type : constr -> constr := "rocq-runtime.plugins.ltac2" "constr_type".
4
5 Print Ltac2 Signatures.
6
7 Print type.
8
9 Locate type.
10
11 About type.
12
13 (* constructors *)
14
15 Print Ltac2 None.
16 Print Ltac2 Some.
17
18 Print Err.
19
20 Ltac2 Type ('a,'b) either := [ Inl ('a) | Inr ('b) ].
21
22 Print Ltac2 Inl.
23 Print Ltac2 Inr.
24
25 Ltac2 Type ('a,'b,'c) triple := [ Triple ('c, 'b, 'a) ].
26
27 Print Ltac2 Triple.
28
29 Print Ltac2 Not_found.
30 Print Ltac2 Out_of_bounds.
31
32 (* alias *)
33
34 Ltac2 Abbreviation nota := () ().
35
36 Print nota.
37
38 (* types *)
39
40 Print constr.
41
42 Ltac2 Type constr := constr.
43
44 Print constr.
45
46 Ltac2 Type ('a,'b) thing := 'b option.
47
48 Print Ltac2 Type thing.
49
50 Ltac2 Type empty := [].
51
52 Print empty.
53
54 Print Ltac2 Type option.
55
56 Print Ltac2 Type bool.
57
58 Print triple.
59
60 Print ref.
61
62 Ltac2 Type ('a,'b,'c) trirecord := { cproj : 'c; mutable bproj : 'b; aproj : 'a }.
63
64 Print trirecord.
65
66 Ltac2 Type extensible := [ .. ].
67
68 Print extensible.
69
70 Ltac2 Type extensible ::= [ Thing (string) ].
71 Ltac2 Type extensible ::= [ OtherThing (bool) ].
72
73 Print extensible.