Skip to content

Commit 37196b0

Browse files
committed
Format odoc_examples
1 parent e6eb862 commit 37196b0

File tree

1 file changed

+40
-41
lines changed

1 file changed

+40
-41
lines changed

doc/examples/markup.mli

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -121,32 +121,33 @@ module Stop : sig
121121

122122
class type foo =
123123
object
124-
(** comment for method m *)
125124
method m : string
125+
(** comment for method m *)
126126

127127
(**/**)
128128

129-
(** This method won't appear in the documentation *)
130129
method bar : int
130+
(** This method won't appear in the documentation *)
131131
end
132132

133+
val foo : string
133134
(** This value appears in the documentation, since the Stop special comment
134135
in the class does not affect the parent module of the class.*)
135-
val foo : string
136136

137137
(**/**)
138-
(** The value bar does not appear in the documentation.*)
138+
139139
val bar : string
140+
(** The value bar does not appear in the documentation.*)
141+
140142
(**/**)
141143

144+
type t = string
142145
(** The type t appears since in the documentation since the previous stop comment
143146
toggled off the "no documentation mode". *)
144-
type t = string
145147
end
146148

147149
(** {2 Scoping rules} *)
148150
module Scope : sig
149-
150151
(** In this floating comment I can refer to type {!t} and value {!v}
151152
declared later in the signature *)
152153

@@ -155,76 +156,74 @@ module Scope : sig
155156
val v : t
156157

157158
val x : int
158-
val y : int
159159

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
163164
type {!u} declared later in the parent module. Elements declared
164165
in this signature take priority, so {!y} refers to {!A.y} as
165166
opposed to the [y] declared in the parent signature.
166167
167168
@see 'markup.mli' for a good time *)
168169

169-
val y : string
170-
end
170+
val y : string
171+
end
171172

172-
type u
173+
type u
173174
end
174175

175-
176176
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 *)
178178

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.
182182
183183
This is the second paragraph in the module Hidden__module.
184184
185185
@canonical Odoc_examples.Markup.Module *)
186186

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
190190

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 *)
193193

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.
197197
198198
This is the second paragraph in the module Hidden__module2.
199199
200200
@canonical Odoc_examples.Markup.Module2 *)
201201

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
205205

206-
module Module2 = Hidden__Module2
206+
module Module2 = Hidden__Module2
207207

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.
210210
211211
This is the second paragraph in the module Hidden__module2.
212212
*)
213-
end
213+
end
214214

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 *)
217217

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.
220220
221221
This is the second paragraph in the module Hidden__module2.
222222
*)
223-
end
223+
end
224224

225-
module Module4 = Nonhidden_module2
225+
module Module4 = Nonhidden_module2
226226

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.
228228
It uses the synopsis from the modules *)
229-
230229
end

0 commit comments

Comments
 (0)