| 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{Inline\_records\_bis}} : This test focuses on the printing of documentation for inline record |
| 11 |
within the latex generator.} |
| 12 |
\label{Inline-underscorerecords-underscorebis}\index{Inline-underscorerecords-underscorebis@\verb`Inline_records_bis`} |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
\ocamldocvspace{0.5cm} |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
\label{exception:Inline-underscorerecords-underscorebis.Simple}\begin{ocamldoccode} |
| 22 |
exception Simple |
| 23 |
\end{ocamldoccode} |
| 24 |
\index{Simple@\verb`Simple`} |
| 25 |
\begin{ocamldocdescription} |
| 26 |
A nice exception |
| 27 |
|
| 28 |
|
| 29 |
\end{ocamldocdescription} |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
\label{exception:Inline-underscorerecords-underscorebis.Less}\begin{ocamldoccode} |
| 35 |
exception Less of int |
| 36 |
\end{ocamldoccode} |
| 37 |
\index{Less@\verb`Less`} |
| 38 |
\begin{ocamldocdescription} |
| 39 |
A less simple exception |
| 40 |
|
| 41 |
|
| 42 |
\end{ocamldocdescription} |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
\label{TYPInline-underscorerecords-underscorebis.ext}\begin{ocamldoccode} |
| 48 |
type ext = .. |
| 49 |
\end{ocamldoccode} |
| 50 |
\index{ext@\verb`ext`} |
| 51 |
\begin{ocamldocdescription} |
| 52 |
An open sum type |
| 53 |
|
| 54 |
|
| 55 |
\end{ocamldocdescription} |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
\label{TYPInline-underscorerecords-underscorebis.r}\begin{ocamldoccode} |
| 61 |
type r = |
| 62 |
{\char123} lbl : int ; |
| 63 |
\end{ocamldoccode} |
| 64 |
\begin{ocamldoccomment} |
| 65 |
Field documentation for non-inline, {\tt{lbl : int}} |
| 66 |
|
| 67 |
|
| 68 |
\end{ocamldoccomment} |
| 69 |
\begin{ocamldoccode} |
| 70 |
more : int list ; |
| 71 |
\end{ocamldoccode} |
| 72 |
\begin{ocamldoccomment} |
| 73 |
More documentation for r, {\tt{more : int list}} |
| 74 |
|
| 75 |
|
| 76 |
\end{ocamldoccomment} |
| 77 |
\begin{ocamldoccode} |
| 78 |
{\char125} |
| 79 |
\end{ocamldoccode} |
| 80 |
\index{r@\verb`r`} |
| 81 |
\begin{ocamldocdescription} |
| 82 |
A simple record type for reference |
| 83 |
|
| 84 |
|
| 85 |
\end{ocamldocdescription} |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
\label{TYPInline-underscorerecords-underscorebis.t}\begin{ocamldoccode} |
| 91 |
type t = |
| 92 |
| A of {\char123} lbl : int ; |
| 93 |
\end{ocamldoccode} |
| 94 |
\begin{ocamldoccomment} |
| 95 |
{\tt{A}} field documentation |
| 96 |
|
| 97 |
|
| 98 |
\end{ocamldoccomment} |
| 99 |
\begin{ocamldoccode} |
| 100 |
more : int list ; |
| 101 |
\end{ocamldoccode} |
| 102 |
\begin{ocamldoccomment} |
| 103 |
More {\tt{A}} field documentation |
| 104 |
|
| 105 |
|
| 106 |
\end{ocamldoccomment} |
| 107 |
\begin{ocamldoccode} |
| 108 |
{\char125} |
| 109 |
\end{ocamldoccode} |
| 110 |
\begin{ocamldoccomment} |
| 111 |
Constructor documentation |
| 112 |
|
| 113 |
|
| 114 |
\end{ocamldoccomment} |
| 115 |
\index{t@\verb`t`} |
| 116 |
\begin{ocamldocdescription} |
| 117 |
A sum type with one inline record |
| 118 |
|
| 119 |
|
| 120 |
\end{ocamldocdescription} |
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
\label{TYPInline-underscorerecords-underscorebis.s}\begin{ocamldoccode} |
| 126 |
type s = |
| 127 |
| B of {\char123} a_label_for_B : int ; |
| 128 |
\end{ocamldoccode} |
| 129 |
\begin{ocamldoccomment} |
| 130 |
{\tt{B}} field documentation |
| 131 |
|
| 132 |
|
| 133 |
\end{ocamldoccomment} |
| 134 |
\begin{ocamldoccode} |
| 135 |
more_label_for_B : int list ; |
| 136 |
\end{ocamldoccode} |
| 137 |
\begin{ocamldoccomment} |
| 138 |
More {\tt{B}} field documentation |
| 139 |
|
| 140 |
|
| 141 |
\end{ocamldoccomment} |
| 142 |
\begin{ocamldoccode} |
| 143 |
{\char125} |
| 144 |
\end{ocamldoccode} |
| 145 |
\begin{ocamldoccomment} |
| 146 |
Constructor B documentation |
| 147 |
|
| 148 |
|
| 149 |
\end{ocamldoccomment} |
| 150 |
\begin{ocamldoccode} |
| 151 |
| C of {\char123} c_has_label_too : float ; |
| 152 |
\end{ocamldoccode} |
| 153 |
\begin{ocamldoccomment} |
| 154 |
{\tt{C}} field documentation |
| 155 |
|
| 156 |
|
| 157 |
\end{ocamldoccomment} |
| 158 |
\begin{ocamldoccode} |
| 159 |
more_than_one : unit ; |
| 160 |
\end{ocamldoccode} |
| 161 |
\begin{ocamldoccomment} |
| 162 |
$\ldots$ documentations |
| 163 |
|
| 164 |
|
| 165 |
\end{ocamldoccomment} |
| 166 |
\begin{ocamldoccode} |
| 167 |
{\char125} |
| 168 |
\end{ocamldoccode} |
| 169 |
\begin{ocamldoccomment} |
| 170 |
Constructor C documentation |
| 171 |
|
| 172 |
|
| 173 |
\end{ocamldoccomment} |
| 174 |
\index{s@\verb`s`} |
| 175 |
\begin{ocamldocdescription} |
| 176 |
A sum type with two inline records |
| 177 |
|
| 178 |
|
| 179 |
\end{ocamldocdescription} |
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
\label{TYPInline-underscorerecords-underscorebis.any}\begin{ocamldoccode} |
| 185 |
type any = |
| 186 |
| D : {\char123} any : {\textquotesingle}a ; |
| 187 |
\end{ocamldoccode} |
| 188 |
\begin{ocamldoccomment} |
| 189 |
{\tt{A}} field {\tt{any:{\textquotesingle}a}} for {\tt{D}} in {\tt{any}}. |
| 190 |
|
| 191 |
|
| 192 |
\end{ocamldoccomment} |
| 193 |
\begin{ocamldoccode} |
| 194 |
{\char125} |
| 195 |
-> |
| 196 |
any |
| 197 |
\end{ocamldoccode} |
| 198 |
\begin{ocamldoccomment} |
| 199 |
Constructor D documentation |
| 200 |
|
| 201 |
|
| 202 |
\end{ocamldoccomment} |
| 203 |
\index{any@\verb`any`} |
| 204 |
\begin{ocamldocdescription} |
| 205 |
A gadt constructor |
| 206 |
|
| 207 |
|
| 208 |
\end{ocamldocdescription} |
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
\label{exception:Inline-underscorerecords-underscorebis.Error}\begin{ocamldoccode} |
| 214 |
exception Error of {\char123} name : string ; |
| 215 |
\end{ocamldoccode} |
| 216 |
\begin{ocamldoccomment} |
| 217 |
Error field documentation {\tt{name:string}} |
| 218 |
|
| 219 |
|
| 220 |
\end{ocamldoccomment} |
| 221 |
\begin{ocamldoccode} |
| 222 |
{\char125} |
| 223 |
\end{ocamldoccode} |
| 224 |
\index{Error@\verb`Error`} |
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
\begin{ocamldoccode} |
| 230 |
type ext += |
| 231 |
\end{ocamldoccode} |
| 232 |
\label{extension:Inline-underscorerecords-underscorebis.E}\begin{ocamldoccode} |
| 233 |
| E of {\char123} yet_another_field : unit ; |
| 234 |
\end{ocamldoccode} |
| 235 |
\begin{ocamldoccomment} |
| 236 |
Field documentation for {\tt{E}} in ext |
| 237 |
|
| 238 |
|
| 239 |
\end{ocamldoccomment} |
| 240 |
\begin{ocamldoccode} |
| 241 |
{\char125} |
| 242 |
\end{ocamldoccode} |
| 243 |
\begin{ocamldoccomment} |
| 244 |
Constructor E documentation |
| 245 |
|
| 246 |
|
| 247 |
\end{ocamldoccomment} |
| 248 |
\label{extension:Inline-underscorerecords-underscorebis.F}\begin{ocamldoccode} |
| 249 |
| F of {\char123} even_more : int -> int ; |
| 250 |
\end{ocamldoccode} |
| 251 |
\begin{ocamldoccomment} |
| 252 |
Some field documentations for {\tt{F}} |
| 253 |
|
| 254 |
|
| 255 |
\end{ocamldoccomment} |
| 256 |
\begin{ocamldoccode} |
| 257 |
{\char125} |
| 258 |
\end{ocamldoccode} |
| 259 |
\begin{ocamldoccomment} |
| 260 |
Constructor F documentation |
| 261 |
|
| 262 |
|
| 263 |
\end{ocamldoccomment} |
| 264 |
\label{extension:Inline-underscorerecords-underscorebis.G}\begin{ocamldoccode} |
| 265 |
| G of {\char123} last : int -> int ; |
| 266 |
\end{ocamldoccode} |
| 267 |
\begin{ocamldoccomment} |
| 268 |
The last and least field documentation |
| 269 |
|
| 270 |
|
| 271 |
\end{ocamldoccomment} |
| 272 |
\begin{ocamldoccode} |
| 273 |
{\char125} |
| 274 |
\end{ocamldoccode} |
| 275 |
\begin{ocamldoccomment} |
| 276 |
Constructor G documentation |
| 277 |
|
| 278 |
|
| 279 |
\end{ocamldoccomment} |
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
Two new constructors for ext |
| 285 |
|
| 286 |
\end{document} |