| 1 |
.SH NAME |
| 2 |
Inline_records \- This test focuses on the printing of documentation for inline record within the latex generator. |
| 3 |
.SH Module |
| 4 |
Module Inline_records |
| 5 |
.SH Documentation |
| 6 |
.sp |
| 7 |
Module |
| 8 |
.BI "Inline_records" |
| 9 |
: |
| 10 |
.B sig end |
| 11 |
|
| 12 |
.sp |
| 13 |
This test focuses on the printing of documentation for inline record |
| 14 |
within the latex generator\&. |
| 15 |
|
| 16 |
.sp |
| 17 |
|
| 18 |
.sp |
| 19 |
.sp |
| 20 |
|
| 21 |
.I exception Simple |
| 22 |
|
| 23 |
.sp |
| 24 |
A nice exception |
| 25 |
|
| 26 |
.sp |
| 27 |
|
| 28 |
.I exception Less |
| 29 |
.B of |
| 30 |
.B int |
| 31 |
|
| 32 |
.sp |
| 33 |
A less simple exception |
| 34 |
|
| 35 |
.sp |
| 36 |
.I type ext |
| 37 |
= .. |
| 38 |
|
| 39 |
.sp |
| 40 |
An open sum type |
| 41 |
|
| 42 |
.sp |
| 43 |
.I type r |
| 44 |
= { |
| 45 |
lbl : |
| 46 |
.B int |
| 47 |
; (* Field documentation for non\-inline, |
| 48 |
.ft B |
| 49 |
lbl : int |
| 50 |
.ft R |
| 51 |
|
| 52 |
*) |
| 53 |
more : |
| 54 |
.B int list |
| 55 |
; (* More documentation for r, |
| 56 |
.ft B |
| 57 |
more : int list |
| 58 |
.ft R |
| 59 |
|
| 60 |
*) |
| 61 |
} |
| 62 |
|
| 63 |
.sp |
| 64 |
A simple record type for reference |
| 65 |
|
| 66 |
.sp |
| 67 |
.I type t |
| 68 |
= |
| 69 |
| A |
| 70 |
.B of { |
| 71 |
lbl : |
| 72 |
.B int |
| 73 |
; (* |
| 74 |
.ft B |
| 75 |
A |
| 76 |
.ft R |
| 77 |
field documentation |
| 78 |
*) |
| 79 |
more : |
| 80 |
.B int list |
| 81 |
; (* More |
| 82 |
.ft B |
| 83 |
A |
| 84 |
.ft R |
| 85 |
field documentation |
| 86 |
*) |
| 87 |
} |
| 88 |
.I " " |
| 89 |
(* Constructor documentation |
| 90 |
*) |
| 91 |
|
| 92 |
.sp |
| 93 |
A sum type with one inline record |
| 94 |
|
| 95 |
.sp |
| 96 |
.I type s |
| 97 |
= |
| 98 |
| B |
| 99 |
.B of { |
| 100 |
a_label_for_B : |
| 101 |
.B int |
| 102 |
; (* |
| 103 |
.ft B |
| 104 |
B |
| 105 |
.ft R |
| 106 |
field documentation |
| 107 |
*) |
| 108 |
more_label_for_B : |
| 109 |
.B int list |
| 110 |
; (* More |
| 111 |
.ft B |
| 112 |
B |
| 113 |
.ft R |
| 114 |
field documentation |
| 115 |
*) |
| 116 |
} |
| 117 |
.I " " |
| 118 |
(* Constructor B documentation |
| 119 |
*) |
| 120 |
| C |
| 121 |
.B of { |
| 122 |
c_has_label_too : |
| 123 |
.B float |
| 124 |
; (* |
| 125 |
.ft B |
| 126 |
C |
| 127 |
.ft R |
| 128 |
field documentation |
| 129 |
*) |
| 130 |
more_than_one : |
| 131 |
.B unit |
| 132 |
; (* \&.\&.\&. documentations |
| 133 |
*) |
| 134 |
} |
| 135 |
.I " " |
| 136 |
(* Constructor C documentation |
| 137 |
*) |
| 138 |
|
| 139 |
.sp |
| 140 |
A sum type with two inline records |
| 141 |
|
| 142 |
.sp |
| 143 |
.I type any |
| 144 |
= |
| 145 |
| D |
| 146 |
.B of { |
| 147 |
any : |
| 148 |
.B 'a |
| 149 |
; (* |
| 150 |
.ft B |
| 151 |
A |
| 152 |
.ft R |
| 153 |
field |
| 154 |
.ft B |
| 155 |
any:\&'a |
| 156 |
.ft R |
| 157 |
for |
| 158 |
.ft B |
| 159 |
D |
| 160 |
.ft R |
| 161 |
in |
| 162 |
.ft B |
| 163 |
any |
| 164 |
.ft R |
| 165 |
\&. |
| 166 |
*) |
| 167 |
} |
| 168 |
.B -> |
| 169 |
.B any |
| 170 |
.I " " |
| 171 |
(* Constructor D documentation |
| 172 |
*) |
| 173 |
|
| 174 |
.sp |
| 175 |
A gadt constructor |
| 176 |
|
| 177 |
.sp |
| 178 |
|
| 179 |
.I exception Error |
| 180 |
.B of { |
| 181 |
name : |
| 182 |
.B string |
| 183 |
; (* Error field documentation |
| 184 |
.ft B |
| 185 |
name:string |
| 186 |
.ft R |
| 187 |
|
| 188 |
*) |
| 189 |
} |
| 190 |
|
| 191 |
.sp |
| 192 |
|
| 193 |
.sp |
| 194 |
.I type ext |
| 195 |
+= |
| 196 |
| E |
| 197 |
.B of { |
| 198 |
yet_another_field : |
| 199 |
.B unit |
| 200 |
; (* Field documentation for |
| 201 |
.ft B |
| 202 |
E |
| 203 |
.ft R |
| 204 |
in ext |
| 205 |
*) |
| 206 |
} |
| 207 |
.I " " |
| 208 |
(* Constructor E documentation |
| 209 |
*) |
| 210 |
| F |
| 211 |
.B of { |
| 212 |
even_more : |
| 213 |
.B int -> int |
| 214 |
; (* Some field documentations for |
| 215 |
.ft B |
| 216 |
F |
| 217 |
.ft R |
| 218 |
|
| 219 |
*) |
| 220 |
} |
| 221 |
.I " " |
| 222 |
(* Constructor F documentation |
| 223 |
*) |
| 224 |
| G |
| 225 |
.B of { |
| 226 |
last : |
| 227 |
.B int -> int |
| 228 |
; (* The last and least field documentation |
| 229 |
*) |
| 230 |
} |
| 231 |
.I " " |
| 232 |
(* Constructor G documentation |
| 233 |
*) |
| 234 |
|
| 235 |
.sp |
| 236 |
Two new constructors for ext |
| 237 |
|
| 238 |
.sp |