1CamlinternalFormatBasics(3) OCaml library CamlinternalFormatBasics(3)
2
3
4
6 CamlinternalFormatBasics - no description
7
9 Module CamlinternalFormatBasics
10
12 Module CamlinternalFormatBasics
13 : sig end
14
15
16
17
18
19
20
21 type padty =
22 | Left
23 | Right
24 | Zeros
25
26
27
28
29 type int_conv =
30 | Int_d
31 | Int_pd
32 | Int_sd
33 | Int_i
34 | Int_pi
35 | Int_si
36 | Int_x
37 | Int_Cx
38 | Int_X
39 | Int_CX
40 | Int_o
41 | Int_Co
42 | Int_u
43 | Int_Cd
44 | Int_Ci
45 | Int_Cu
46
47
48
49
50 type float_flag_conv =
51 | Float_flag_
52 | Float_flag_p
53 | Float_flag_s
54
55
56
57
58 type float_kind_conv =
59 | Float_f
60 | Float_e
61 | Float_E
62 | Float_g
63 | Float_G
64 | Float_F
65 | Float_h
66 | Float_H
67 | Float_CF
68
69
70
71
72 type float_conv = float_flag_conv * float_kind_conv
73
74
75
76
77 type char_set = string
78
79
80
81
82 type counter =
83 | Line_counter
84 | Char_counter
85 | Token_counter
86
87
88
89
90 type ('a, 'b) padding =
91 | No_padding : ('a0, 'a0) padding
92 | Lit_padding : padty * int -> ('a1, 'a1) padding
93 | Arg_padding : padty -> (int -> 'a2, 'a2) padding
94
95
96
97
98 type pad_option = int option
99
100
101
102
103 type ('a, 'b) precision =
104 | No_precision : ('a0, 'a0) precision
105 | Lit_precision : int -> ('a1, 'a1) precision
106 | Arg_precision : (int -> 'a2, 'a2) precision
107
108
109
110
111 type prec_option = int option
112
113
114
115
116 type ('a, 'b, 'c) custom_arity =
117 | Custom_zero : ('a0, string, 'a0) custom_arity
118 | Custom_succ : ('a1, 'b0, 'c0) custom_arity -> ('a1, 'x -> 'b0, 'x ->
119 'c0) custom_arity
120
121
122
123
124 type block_type =
125 | Pp_hbox
126 | Pp_vbox
127 | Pp_hvbox
128 | Pp_hovbox
129 | Pp_box
130 | Pp_fits
131
132
133
134
135 type formatting_lit =
136 | Close_box
137 | Close_tag
138 | Break of string * int * int
139 | FFlush
140 | Force_newline
141 | Flush_newline
142 | Magic_size of string * int
143 | Escaped_at
144 | Escaped_percent
145 | Scan_indic of char
146
147
148
149
150 type ('a, 'b, 'c, 'd, 'e, 'f) formatting_gen =
151 | Open_tag : ('a0, 'b0, 'c0, 'd0, 'e0, 'f0) format6 -> ('a0, 'b0, 'c0,
152 'd0, 'e0, 'f0) formatting_gen
153 | Open_box : ('a1, 'b1, 'c1, 'd1, 'e1, 'f1) format6 -> ('a1, 'b1, 'c1,
154 'd1, 'e1, 'f1) formatting_gen
155
156
157
158
159 type ('a, 'b, 'c, 'd, 'e, 'f) fmtty = ('a, 'b, 'c, 'd, 'e, 'f, 'a, 'b,
160 'c, 'd, 'e, 'f) fmtty_rel
161
162
163
164
165 type ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2)
166 fmtty_rel =
167 | Char_ty : ('a10, 'b10, 'c10, 'd10, 'e10, 'f10, 'a20, 'b20, 'c20,
168 'd20, 'e20, 'f20) fmtty_rel -> (char -> 'a10, 'b10, 'c10, 'd10, 'e10,
169 'f10, char -> 'a20, 'b20, 'c20, 'd20, 'e20, 'f20) fmtty_rel
170 | String_ty : ('a11, 'b11, 'c11, 'd11, 'e11, 'f11, 'a21, 'b21, 'c21,
171 'd21, 'e21, 'f21) fmtty_rel -> (string -> 'a11, 'b11, 'c11, 'd11, 'e11,
172 'f11, string -> 'a21, 'b21, 'c21, 'd21, 'e21, 'f21) fmtty_rel
173 | Int_ty : ('a12, 'b12, 'c12, 'd12, 'e12, 'f12, 'a22, 'b22, 'c22,
174 'd22, 'e22, 'f22) fmtty_rel -> (int -> 'a12, 'b12, 'c12, 'd12, 'e12,
175 'f12, int -> 'a22, 'b22, 'c22, 'd22, 'e22, 'f22) fmtty_rel
176 | Int32_ty : ('a13, 'b13, 'c13, 'd13, 'e13, 'f13, 'a23, 'b23, 'c23,
177 'd23, 'e23, 'f23) fmtty_rel -> (int32 -> 'a13, 'b13, 'c13, 'd13, 'e13,
178 'f13, int32 -> 'a23, 'b23, 'c23, 'd23, 'e23, 'f23) fmtty_rel
179 | Nativeint_ty : ('a14, 'b14, 'c14, 'd14, 'e14, 'f14, 'a24, 'b24,
180 'c24, 'd24, 'e24, 'f24) fmtty_rel -> (nativeint -> 'a14, 'b14, 'c14,
181 'd14, 'e14, 'f14, nativeint -> 'a24, 'b24, 'c24, 'd24, 'e24, 'f24)
182 fmtty_rel
183 | Int64_ty : ('a15, 'b15, 'c15, 'd15, 'e15, 'f15, 'a25, 'b25, 'c25,
184 'd25, 'e25, 'f25) fmtty_rel -> (int64 -> 'a15, 'b15, 'c15, 'd15, 'e15,
185 'f15, int64 -> 'a25, 'b25, 'c25, 'd25, 'e25, 'f25) fmtty_rel
186 | Float_ty : ('a16, 'b16, 'c16, 'd16, 'e16, 'f16, 'a26, 'b26, 'c26,
187 'd26, 'e26, 'f26) fmtty_rel -> (float -> 'a16, 'b16, 'c16, 'd16, 'e16,
188 'f16, float -> 'a26, 'b26, 'c26, 'd26, 'e26, 'f26) fmtty_rel
189 | Bool_ty : ('a17, 'b17, 'c17, 'd17, 'e17, 'f17, 'a27, 'b27, 'c27,
190 'd27, 'e27, 'f27) fmtty_rel -> (bool -> 'a17, 'b17, 'c17, 'd17, 'e17,
191 'f17, bool -> 'a27, 'b27, 'c27, 'd27, 'e27, 'f27) fmtty_rel
192 | Format_arg_ty : ('g, 'h, 'i, 'j, 'k, 'l) fmtty * ('a18, 'b18, 'c18,
193 'd18, 'e18, 'f18, 'a28, 'b28, 'c28, 'd28, 'e28, 'f28) fmtty_rel ->
194 (('g, 'h, 'i, 'j, 'k, 'l) format6 -> 'a18, 'b18, 'c18, 'd18, 'e18,
195 'f18, ('g, 'h, 'i, 'j, 'k, 'l) format6 -> 'a28, 'b28, 'c28, 'd28, 'e28,
196 'f28) fmtty_rel
197 | Format_subst_ty : ('g0, 'h0, 'i0, 'j0, 'k0, 'l0, 'g1, 'b19, 'c19,
198 'j1, 'd19, 'a19) fmtty_rel * ('g0, 'h0, 'i0, 'j0, 'k0, 'l0, 'g2, 'b29,
199 'c29, 'j2, 'd29, 'a29) fmtty_rel * ('a19, 'b19, 'c19, 'd19, 'e19, 'f19,
200 'a29, 'b29, 'c29, 'd29, 'e29, 'f29) fmtty_rel -> (('g0, 'h0, 'i0, 'j0,
201 'k0, 'l0) format6 -> 'g1, 'b19, 'c19, 'j1, 'e19, 'f19, ('g0, 'h0, 'i0,
202 'j0, 'k0, 'l0) format6 -> 'g2, 'b29, 'c29, 'j2, 'e29, 'f29) fmtty_rel
203 | Alpha_ty : ('a110, 'b110, 'c110, 'd110, 'e110, 'f110, 'a210, 'b210,
204 'c210, 'd210, 'e210, 'f210) fmtty_rel -> (('b110 -> 'x -> 'c110) -> 'x
205 -> 'a110, 'b110, 'c110, 'd110, 'e110, 'f110, ('b210 -> 'x -> 'c210) ->
206 'x -> 'a210, 'b210, 'c210, 'd210, 'e210, 'f210) fmtty_rel
207 | Theta_ty : ('a111, 'b111, 'c111, 'd111, 'e111, 'f111, 'a211, 'b211,
208 'c211, 'd211, 'e211, 'f211) fmtty_rel -> (('b111 -> 'c111) -> 'a111,
209 'b111, 'c111, 'd111, 'e111, 'f111, ('b211 -> 'c211) -> 'a211, 'b211,
210 'c211, 'd211, 'e211, 'f211) fmtty_rel
211 | Any_ty : ('a112, 'b112, 'c112, 'd112, 'e112, 'f112, 'a212, 'b212,
212 'c212, 'd212, 'e212, 'f212) fmtty_rel -> ('x0 -> 'a112, 'b112, 'c112,
213 'd112, 'e112, 'f112, 'x0 -> 'a212, 'b212, 'c212, 'd212, 'e212, 'f212)
214 fmtty_rel
215 | Reader_ty : ('a113, 'b113, 'c113, 'd113, 'e113, 'f113, 'a213, 'b213,
216 'c213, 'd213, 'e213, 'f213) fmtty_rel -> ('x1 -> 'a113, 'b113, 'c113,
217 ('b113 -> 'x1) -> 'd113, 'e113, 'f113, 'x1 -> 'a213, 'b213, 'c213,
218 ('b213 -> 'x1) -> 'd213, 'e213, 'f213) fmtty_rel
219 | Ignored_reader_ty : ('a114, 'b114, 'c114, 'd114, 'e114, 'f114,
220 'a214, 'b214, 'c214, 'd214, 'e214, 'f214) fmtty_rel -> ('a114, 'b114,
221 'c114, ('b114 -> 'x2) -> 'd114, 'e114, 'f114, 'a214, 'b214, 'c214,
222 ('b214 -> 'x2) -> 'd214, 'e214, 'f214) fmtty_rel
223 | End_of_fmtty : ('f115, 'b115, 'c115, 'd115, 'd115, 'f115, 'f215,
224 'b215, 'c215, 'd215, 'd215, 'f215) fmtty_rel
225
226
227
228
229 type ('a, 'b, 'c, 'd, 'e, 'f) fmt =
230 | Char : ('a0, 'b0, 'c0, 'd0, 'e0, 'f0) fmt -> (char -> 'a0, 'b0, 'c0,
231 'd0, 'e0, 'f0) fmt
232 | Caml_char : ('a1, 'b1, 'c1, 'd1, 'e1, 'f1) fmt -> (char -> 'a1, 'b1,
233 'c1, 'd1, 'e1, 'f1) fmt
234 | String : ('x, string -> 'a2) padding * ('a2, 'b2, 'c2, 'd2, 'e2,
235 'f2) fmt -> ('x, 'b2, 'c2, 'd2, 'e2, 'f2) fmt
236 | Caml_string : ('x0, string -> 'a3) padding * ('a3, 'b3, 'c3, 'd3,
237 'e3, 'f3) fmt -> ('x0, 'b3, 'c3, 'd3, 'e3, 'f3) fmt
238 | Int : int_conv * ('x1, 'y) padding * ('y, int -> 'a4) precision *
239 ('a4, 'b4, 'c4, 'd4, 'e4, 'f4) fmt -> ('x1, 'b4, 'c4, 'd4, 'e4, 'f4)
240 fmt
241 | Int32 : int_conv * ('x2, 'y0) padding * ('y0, int32 -> 'a5) preci‐
242 sion * ('a5, 'b5, 'c5, 'd5, 'e5, 'f5) fmt -> ('x2, 'b5, 'c5, 'd5, 'e5,
243 'f5) fmt
244 | Nativeint : int_conv * ('x3, 'y1) padding * ('y1, nativeint -> 'a6)
245 precision * ('a6, 'b6, 'c6, 'd6, 'e6, 'f6) fmt -> ('x3, 'b6, 'c6, 'd6,
246 'e6, 'f6) fmt
247 | Int64 : int_conv * ('x4, 'y2) padding * ('y2, int64 -> 'a7) preci‐
248 sion * ('a7, 'b7, 'c7, 'd7, 'e7, 'f7) fmt -> ('x4, 'b7, 'c7, 'd7, 'e7,
249 'f7) fmt
250 | Float : float_conv * ('x5, 'y3) padding * ('y3, float -> 'a8) preci‐
251 sion * ('a8, 'b8, 'c8, 'd8, 'e8, 'f8) fmt -> ('x5, 'b8, 'c8, 'd8, 'e8,
252 'f8) fmt
253 | Bool : ('x6, bool -> 'a9) padding * ('a9, 'b9, 'c9, 'd9, 'e9, 'f9)
254 fmt -> ('x6, 'b9, 'c9, 'd9, 'e9, 'f9) fmt
255 | Flush : ('a10, 'b10, 'c10, 'd10, 'e10, 'f10) fmt -> ('a10, 'b10,
256 'c10, 'd10, 'e10, 'f10) fmt
257 | String_literal : string * ('a11, 'b11, 'c11, 'd11, 'e11, 'f11) fmt
258 -> ('a11, 'b11, 'c11, 'd11, 'e11, 'f11) fmt
259 | Char_literal : char * ('a12, 'b12, 'c12, 'd12, 'e12, 'f12) fmt ->
260 ('a12, 'b12, 'c12, 'd12, 'e12, 'f12) fmt
261 | Format_arg : pad_option * ('g, 'h, 'i, 'j, 'k, 'l) fmtty * ('a13,
262 'b13, 'c13, 'd13, 'e13, 'f13) fmt -> (('g, 'h, 'i, 'j, 'k, 'l) format6
263 -> 'a13, 'b13, 'c13, 'd13, 'e13, 'f13) fmt
264 | Format_subst : pad_option * ('g0, 'h0, 'i0, 'j0, 'k0, 'l0, 'g2,
265 'b14, 'c14, 'j2, 'd14, 'a14) fmtty_rel * ('a14, 'b14, 'c14, 'd14, 'e14,
266 'f14) fmt -> (('g0, 'h0, 'i0, 'j0, 'k0, 'l0) format6 -> 'g2, 'b14,
267 'c14, 'j2, 'e14, 'f14) fmt
268 | Alpha : ('a15, 'b15, 'c15, 'd15, 'e15, 'f15) fmt -> (('b15 -> 'x7 ->
269 'c15) -> 'x7 -> 'a15, 'b15, 'c15, 'd15, 'e15, 'f15) fmt
270 | Theta : ('a16, 'b16, 'c16, 'd16, 'e16, 'f16) fmt -> (('b16 -> 'c16)
271 -> 'a16, 'b16, 'c16, 'd16, 'e16, 'f16) fmt
272 | Formatting_lit : formatting_lit * ('a17, 'b17, 'c17, 'd17, 'e17,
273 'f17) fmt -> ('a17, 'b17, 'c17, 'd17, 'e17, 'f17) fmt
274 | Formatting_gen : ('a18, 'b18, 'c18, 'd18, 'e18, 'f18) formatting_gen
275 * ('f18, 'b18, 'c18, 'e18, 'e20, 'f20) fmt -> ('a18, 'b18, 'c18, 'd18,
276 'e20, 'f20) fmt
277 | Reader : ('a19, 'b19, 'c19, 'd19, 'e19, 'f19) fmt -> ('x8 -> 'a19,
278 'b19, 'c19, ('b19 -> 'x8) -> 'd19, 'e19, 'f19) fmt
279 | Scan_char_set : pad_option * char_set * ('a20, 'b20, 'c20, 'd20,
280 'e21, 'f21) fmt -> (string -> 'a20, 'b20, 'c20, 'd20, 'e21, 'f21) fmt
281 | Scan_get_counter : counter * ('a21, 'b21, 'c21, 'd21, 'e22, 'f22)
282 fmt -> (int -> 'a21, 'b21, 'c21, 'd21, 'e22, 'f22) fmt
283 | Scan_next_char : ('a22, 'b22, 'c22, 'd22, 'e23, 'f23) fmt -> (char
284 -> 'a22, 'b22, 'c22, 'd22, 'e23, 'f23) fmt
285 | Ignored_param : ('a23, 'b23, 'c23, 'd23, 'y4, 'x9) ignored * ('x9,
286 'b23, 'c23, 'y4, 'e24, 'f24) fmt -> ('a23, 'b23, 'c23, 'd23, 'e24,
287 'f24) fmt
288 | Custom : ('a24, 'x10, 'y5) custom_arity * (unit -> 'x10) * ('a24,
289 'b24, 'c24, 'd24, 'e25, 'f25) fmt -> ('y5, 'b24, 'c24, 'd24, 'e25,
290 'f25) fmt
291 | End_of_format : ('f26, 'b25, 'c25, 'e26, 'e26, 'f26) fmt
292
293
294 List of format elements.
295
296
297 type ('a, 'b, 'c, 'd, 'e, 'f) ignored =
298 | Ignored_char : ('a0, 'b0, 'c0, 'd0, 'd0, 'a0) ignored
299 | Ignored_caml_char : ('a1, 'b1, 'c1, 'd1, 'd1, 'a1) ignored
300 | Ignored_string : pad_option -> ('a2, 'b2, 'c2, 'd2, 'd2, 'a2) ig‐
301 nored
302 | Ignored_caml_string : pad_option -> ('a3, 'b3, 'c3, 'd3, 'd3, 'a3)
303 ignored
304 | Ignored_int : int_conv * pad_option -> ('a4, 'b4, 'c4, 'd4, 'd4,
305 'a4) ignored
306 | Ignored_int32 : int_conv * pad_option -> ('a5, 'b5, 'c5, 'd5, 'd5,
307 'a5) ignored
308 | Ignored_nativeint : int_conv * pad_option -> ('a6, 'b6, 'c6, 'd6,
309 'd6, 'a6) ignored
310 | Ignored_int64 : int_conv * pad_option -> ('a7, 'b7, 'c7, 'd7, 'd7,
311 'a7) ignored
312 | Ignored_float : pad_option * prec_option -> ('a8, 'b8, 'c8, 'd8,
313 'd8, 'a8) ignored
314 | Ignored_bool : pad_option -> ('a9, 'b9, 'c9, 'd9, 'd9, 'a9) ignored
315 | Ignored_format_arg : pad_option * ('g, 'h, 'i, 'j, 'k, 'l) fmtty ->
316 ('a10, 'b10, 'c10, 'd10, 'd10, 'a10) ignored
317 | Ignored_format_subst : pad_option * ('a11, 'b11, 'c11, 'd11, 'e0,
318 'f0) fmtty -> ('a11, 'b11, 'c11, 'd11, 'e0, 'f0) ignored
319 | Ignored_reader : ('a12, 'b12, 'c12, ('b12 -> 'x) -> 'd12, 'd12,
320 'a12) ignored
321 | Ignored_scan_char_set : pad_option * char_set -> ('a13, 'b13, 'c13,
322 'd13, 'd13, 'a13) ignored
323 | Ignored_scan_get_counter : counter -> ('a14, 'b14, 'c14, 'd14, 'd14,
324 'a14) ignored
325 | Ignored_scan_next_char : ('a15, 'b15, 'c15, 'd15, 'd15, 'a15) ig‐
326 nored
327
328
329
330
331 type ('a, 'b, 'c, 'd, 'e, 'f) format6 =
332 | Format of ('a, 'b, 'c, 'd, 'e, 'f) fmt * string
333
334
335
336
337
338 val concat_fmtty : ('g1, 'b1, 'c1, 'j1, 'd1, 'a1, 'g2, 'b2, 'c2, 'j2,
339 'd2, 'a2) fmtty_rel -> ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2,
340 'd2, 'e2, 'f2) fmtty_rel -> ('g1, 'b1, 'c1, 'j1, 'e1, 'f1, 'g2, 'b2,
341 'c2, 'j2, 'e2, 'f2) fmtty_rel
342
343
344
345
346 val erase_rel : ('a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l)
347 fmtty_rel -> ('a, 'b, 'c, 'd, 'e, 'f) fmtty
348
349
350
351
352 val concat_fmt : ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('f, 'b, 'c, 'e, 'g,
353 'h) fmt -> ('a, 'b, 'c, 'd, 'g, 'h) fmt
354
355
356
357
358
359
360OCamldoc 2023-07-20 CamlinternalFormatBasics(3)