Debian Codegraph @

testsuite/tests/tool-ocamldoc/Variants.latex.reference

raw
1 \documentclass[11pt]{article}
2 \usepackage[latin1]{inputenc}
3 \usepackage[T1]{fontenc}
4 \usepackage{textcomp}
5 \usepackage{fullpage}
6 \usepackage{url}
7 \usepackage{ocamldoc}
8 \begin{document}
9 \tableofcontents
10 \section{Module {\tt{Variants}} : This test is here to check the latex code generated for variants}
11 \label{Variants}\index{Variants@\verb`Variants`}
12
13
14
15
16 \ocamldocvspace{0.5cm}
17
18
19
20 \label{TYPVariants.s}\begin{ocamldoccode}
21 type s =
22 | A
23 | B
24 \end{ocamldoccode}
25 \begin{ocamldoccomment}
26 only B is documented here
27
28
29 \end{ocamldoccomment}
30 \begin{ocamldoccode}
31 | C
32 \end{ocamldoccode}
33 \index{s@\verb`s`}
34
35
36
37
38 \label{TYPVariants.t}\begin{ocamldoccode}
39 type t =
40 | A
41 \end{ocamldoccode}
42 \begin{ocamldoccomment}
43 doc for A.
44 \begin{ocamldoccode}
45 0
46 \end{ocamldoccode}
47
48 With three paragraphs.
49 \begin{ocamldoccode}
50 1
51 \end{ocamldoccode}
52
53 To check styling
54
55
56 \end{ocamldoccomment}
57 \begin{ocamldoccode}
58 | B
59 \end{ocamldoccode}
60 \begin{ocamldoccomment}
61 doc for B
62
63
64 \end{ocamldoccomment}
65 \index{t@\verb`t`}
66
67
68
69
70 \label{TYPVariants.u}\begin{ocamldoccode}
71 type u =
72 | A
73 \end{ocamldoccode}
74 \begin{ocamldoccomment}
75 doc for A
76
77
78 \end{ocamldoccomment}
79 \begin{ocamldoccode}
80 | B of unit
81 \end{ocamldoccode}
82 \begin{ocamldoccomment}
83 doc for B
84
85
86 \end{ocamldoccomment}
87 \index{u@\verb`u`}
88 \begin{ocamldocdescription}
89 Some documentation for u
90
91
92 \end{ocamldocdescription}
93
94
95
96
97 \label{TYPVariants.w}\begin{ocamldoccode}
98 type w =
99 | A of {\char123} x : int ;
100 {\char125}
101 \end{ocamldoccode}
102 \begin{ocamldoccomment}
103 doc for A
104
105
106 \end{ocamldoccomment}
107 \begin{ocamldoccode}
108 | B of {\char123} y : int ;
109 {\char125}
110 \end{ocamldoccode}
111 \begin{ocamldoccomment}
112 doc for B
113
114
115 \end{ocamldoccomment}
116 \index{w@\verb`w`}
117 \begin{ocamldocdescription}
118 With records
119
120
121 \end{ocamldocdescription}
122
123
124
125
126 \label{TYPVariants.z}\begin{ocamldoccode}
127 type z =
128 | A of int
129 \end{ocamldoccode}
130 \begin{ocamldoccomment}
131 doc for A
132
133
134 \end{ocamldoccomment}
135 \begin{ocamldoccode}
136 | B of int
137 \end{ocamldoccode}
138 \begin{ocamldoccomment}
139 doc for B
140
141
142 \end{ocamldoccomment}
143 \index{z@\verb`z`}
144 \begin{ocamldocdescription}
145 With args
146
147
148 \end{ocamldocdescription}
149
150
151
152
153 \label{TYPVariants.a}\begin{ocamldoccode}
154 type a =
155 | A : a
156 \end{ocamldoccode}
157 \begin{ocamldoccomment}
158 doc for A
159
160
161 \end{ocamldoccomment}
162 \index{a@\verb`a`}
163 \begin{ocamldocdescription}
164 Gadt notation
165
166
167 \end{ocamldocdescription}
168
169
170
171
172 \label{TYPVariants.b}\begin{ocamldoccode}
173 type b =
174 | B
175 \end{ocamldoccode}
176 \begin{ocamldoccomment}
177 doc for B
178
179
180 \end{ocamldoccomment}
181 \index{b@\verb`b`}
182 \begin{ocamldocdescription}
183 Lonely constructor
184
185
186 \end{ocamldocdescription}
187
188
189
190
191 \label{TYPVariants.no-underscoredocumentation}\begin{ocamldoccode}
192 type no_documentation =
193 | A
194 | B
195 | C
196 \end{ocamldoccode}
197 \index{no-underscoredocumentation@\verb`no_documentation`}
198
199
200
201
202 \label{TYPVariants.e}\begin{ocamldoccode}
203 type e =
204 |
205 \end{ocamldoccode}
206 \index{e@\verb`e`}
207 \begin{ocamldocdescription}
208 Empty variant
209
210
211 \end{ocamldocdescription}
212
213
214 \end{document}