@@ -121,32 +121,33 @@ module Stop : sig
121
121
122
122
class type foo =
123
123
object
124
- (* * comment for method m *)
125
124
method m : string
125
+ (* * comment for method m *)
126
126
127
127
(* */**)
128
128
129
- (* * This method won't appear in the documentation *)
130
129
method bar : int
130
+ (* * This method won't appear in the documentation *)
131
131
end
132
132
133
+ val foo : string
133
134
(* * This value appears in the documentation, since the Stop special comment
134
135
in the class does not affect the parent module of the class.*)
135
- val foo : string
136
136
137
137
(* */**)
138
- (* * The value bar does not appear in the documentation. *)
138
+
139
139
val bar : string
140
+ (* * The value bar does not appear in the documentation.*)
141
+
140
142
(* */**)
141
143
144
+ type t = string
142
145
(* * The type t appears since in the documentation since the previous stop comment
143
146
toggled off the "no documentation mode". *)
144
- type t = string
145
147
end
146
148
147
149
(* * {2 Scoping rules} *)
148
150
module Scope : sig
149
-
150
151
(* * In this floating comment I can refer to type {!t} and value {!v}
151
152
declared later in the signature *)
152
153
@@ -155,76 +156,74 @@ module Scope : sig
155
156
val v : t
156
157
157
158
val x : int
158
- val y : int
159
159
160
- module A : sig
161
-
162
- (* * In this module I can refer to val {!x} declared above as well as
160
+ val y : int
161
+
162
+ module A : sig
163
+ (* * In this module I can refer to val {!x} declared above as well as
163
164
type {!u} declared later in the parent module. Elements declared
164
165
in this signature take priority, so {!y} refers to {!A.y} as
165
166
opposed to the [y] declared in the parent signature.
166
167
167
168
@see 'markup.mli' for a good time *)
168
169
169
- val y : string
170
- end
170
+ val y : string
171
+ end
171
172
172
- type u
173
+ type u
173
174
end
174
175
175
-
176
176
module Preamble_examples : sig
177
- (* * This module demonstrates the various ways that preambles are calculated *)
177
+ (* * This module demonstrates the various ways that preambles are calculated *)
178
178
179
- (* * This is the comment attached to the declaration of Hidden__Module *)
180
- module Hidden__Module : sig
181
- (* * This is the top comment declared in the module Hidden__module.
179
+ (* * This is the comment attached to the declaration of Hidden__Module *)
180
+ module Hidden__Module : sig
181
+ (* * This is the top comment declared in the module Hidden__module.
182
182
183
183
This is the second paragraph in the module Hidden__module.
184
184
185
185
@canonical Odoc_examples.Markup.Module *)
186
186
187
- type t
188
- (* * This is a comment on type t *)
189
- end
187
+ type t
188
+ (* * This is a comment on type t *)
189
+ end
190
190
191
- module Module = Hidden__Module
192
- (* * This comment is on the declaration of Module as an alias of Hidden__Module *)
191
+ module Module = Hidden__Module
192
+ (* * This comment is on the declaration of Module as an alias of Hidden__Module *)
193
193
194
- (* * This is the comment attached to the declaration of module Hidden__Module2 *)
195
- module Hidden__Module2 : sig
196
- (* * This is the top comment declared in the module Hidden__module2.
194
+ (* * This is the comment attached to the declaration of module Hidden__Module2 *)
195
+ module Hidden__Module2 : sig
196
+ (* * This is the top comment declared in the module Hidden__module2.
197
197
198
198
This is the second paragraph in the module Hidden__module2.
199
199
200
200
@canonical Odoc_examples.Markup.Module2 *)
201
201
202
- type t
203
- (* * This is a comment on type t *)
204
- end
202
+ type t
203
+ (* * This is a comment on type t *)
204
+ end
205
205
206
- module Module2 = Hidden__Module2
206
+ module Module2 = Hidden__Module2
207
207
208
- module Nonhidden_module : sig
209
- (* * This is the top comment declared in the module Hidden__module2.
208
+ module Nonhidden_module : sig
209
+ (* * This is the top comment declared in the module Hidden__module2.
210
210
211
211
This is the second paragraph in the module Hidden__module2.
212
212
*)
213
- end
213
+ end
214
214
215
- module Module3 = Nonhidden_module
216
- (* * This comment is on the declaration of Module3 as an alias of Nonhidden_module *)
215
+ module Module3 = Nonhidden_module
216
+ (* * This comment is on the declaration of Module3 as an alias of Nonhidden_module *)
217
217
218
- module Nonhidden_module2 : sig
219
- (* * This is the top comment declared in the module Hidden__module2.
218
+ module Nonhidden_module2 : sig
219
+ (* * This is the top comment declared in the module Hidden__module2.
220
220
221
221
This is the second paragraph in the module Hidden__module2.
222
222
*)
223
- end
223
+ end
224
224
225
- module Module4 = Nonhidden_module2
225
+ module Module4 = Nonhidden_module2
226
226
227
- (* * The [modules] special reference can be used to refer to a list of modules.
227
+ (* * The [modules] special reference can be used to refer to a list of modules.
228
228
It uses the synopsis from the modules *)
229
-
230
229
end
0 commit comments