CamlinternalFormatBasics(3) OCaml library CamlinternalFormatBasics(3)

# [NAME](#NAME)

CamlinternalFormatBasics - no description

# [Module](#Module)

Module CamlinternalFormatBasics

# [Documentation](#Documentation)

Module **CamlinternalFormatBasics**  
: **sig end**

*type padty* =  
| Left  
| Right  
| Zeros

*type int\_conv* =  
| Int\_d  
| Int\_pd  
| Int\_sd  
| Int\_i  
| Int\_pi  
| Int\_si  
| Int\_x  
| Int\_Cx  
| Int\_X  
| Int\_CX  
| Int\_o  
| Int\_Co  
| Int\_u  
| Int\_Cd  
| Int\_Ci  
| Int\_Cu

*type float\_flag\_conv* =  
| Float\_flag_  
| Float\_flag\_p  
| Float\_flag\_s

*type float\_kind\_conv* =  
| Float\_f  
| Float\_e  
| Float\_E  
| Float\_g  
| Float\_G  
| Float\_F  
| Float\_h  
| Float\_H  
| Float\_CF

*type float\_conv* = **float\_flag\_conv \*** **float\_kind\_conv**

*type char\_set* = **string**

*type counter* =  
| Line\_counter  
| Char\_counter  
| Token\_counter

*type* **('a, 'b)** *padding* =  
| No\_padding **:** **('a0, 'a0) padding**  
| Lit\_padding **:** **padty * int** **-&gt;** **('a1, 'a1) padding**  
| Arg\_padding **:** **padty** **-&gt;** **(int -&gt; 'a2, 'a2) padding**

*type pad\_option* = **int option**

*type* **('a, 'b)** *precision* =  
| No\_precision **:** **('a0, 'a0) precision**  
| Lit\_precision **:** **int** **-&gt;** **('a1, 'a1) precision**  
| Arg\_precision **:** **(int -&gt; 'a2, 'a2) precision**

*type prec\_option* = **int option**

*type* **('a, 'b, 'c)** *custom\_arity* =  
| Custom\_zero **:** **('a0, string, 'a0) custom\_arity**  
| Custom\_succ **:** **('a1, 'b0, 'c0) custom\_arity** **-&gt;** **('a1, 'x -&gt; 'b0, 'x -&gt; 'c0) custom\_arity**

*type block\_type* =  
| Pp\_hbox  
| Pp\_vbox  
| Pp\_hvbox  
| Pp\_hovbox  
| Pp\_box  
| Pp\_fits

*type formatting\_lit* =  
| Close\_box  
| Close\_tag  
| Break **of** **string * int * int**  
| FFlush  
| Force\_newline  
| Flush\_newline  
| Magic\_size **of** **string * int**  
| Escaped\_at  
| Escaped\_percent  
| Scan\_indic **of** **char**

*type* **('a, 'b, 'c, 'd, 'e, 'f)** *formatting\_gen* =  
| Open\_tag **:** **('a0, 'b0, 'c0, 'd0, 'e0, 'f0) format6** **-&gt;** **('a0, 'b0, 'c0, 'd0, 'e0, 'f0) formatting\_gen**  
| Open\_box **:** **('a1, 'b1, 'c1, 'd1, 'e1, 'f1) format6** **-&gt;** **('a1, 'b1, 'c1, 'd1, 'e1, 'f1) formatting\_gen**

*type* **('a, 'b, 'c, 'd, 'e, 'f)** *fmtty* = **('a, 'b, 'c, 'd, 'e, 'f, 'a, 'b, 'c, 'd, 'e, 'f)** **fmtty\_rel**

*type* **('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2)** *fmtty\_rel* =  
| Char\_ty **:** **('a10, 'b10, 'c10, 'd10, 'e10, 'f10, 'a20, 'b20, 'c20, 'd20, 'e20, 'f20)** **fmtty\_rel** **-&gt;** **(char -&gt; 'a10, 'b10, 'c10, 'd10, 'e10, 'f10, char -&gt; 'a20, 'b20, 'c20, 'd20,** **'e20, 'f20)** **fmtty\_rel**  
| String\_ty **:** **('a11, 'b11, 'c11, 'd11, 'e11, 'f11, 'a21, 'b21, 'c21, 'd21, 'e21, 'f21)** **fmtty\_rel** **-&gt;** **(string -&gt; 'a11, 'b11, 'c11, 'd11, 'e11, 'f11, string -&gt; 'a21, 'b21, 'c21,** **'d21, 'e21, 'f21)** **fmtty\_rel**  
| Int\_ty **:** **('a12, 'b12, 'c12, 'd12, 'e12, 'f12, 'a22, 'b22, 'c22, 'd22, 'e22, 'f22)** **fmtty\_rel** **-&gt;** **(int -&gt; 'a12, 'b12, 'c12, 'd12, 'e12, 'f12, int -&gt; 'a22, 'b22, 'c22, 'd22,** **'e22, 'f22)** **fmtty\_rel**  
| Int32\_ty **:** **('a13, 'b13, 'c13, 'd13, 'e13, 'f13, 'a23, 'b23, 'c23, 'd23, 'e23, 'f23)** **fmtty\_rel** **-&gt;** **(int32 -&gt; 'a13, 'b13, 'c13, 'd13, 'e13, 'f13, int32 -&gt; 'a23, 'b23, 'c23,** **'d23, 'e23, 'f23)** **fmtty\_rel**  
| Nativeint\_ty **:** **('a14, 'b14, 'c14, 'd14, 'e14, 'f14, 'a24, 'b24, 'c24, 'd24, 'e24, 'f24)** **fmtty\_rel** **-&gt;** **(nativeint -&gt; 'a14, 'b14, 'c14, 'd14, 'e14, 'f14, nativeint -&gt; 'a24, 'b24,** **'c24, 'd24, 'e24, 'f24)** **fmtty\_rel**  
| Int64\_ty **:** **('a15, 'b15, 'c15, 'd15, 'e15, 'f15, 'a25, 'b25, 'c25, 'd25, 'e25, 'f25)** **fmtty\_rel** **-&gt;** **(int64 -&gt; 'a15, 'b15, 'c15, 'd15, 'e15, 'f15, int64 -&gt; 'a25, 'b25, 'c25,** **'d25, 'e25, 'f25)** **fmtty\_rel**  
| Float\_ty **:** **('a16, 'b16, 'c16, 'd16, 'e16, 'f16, 'a26, 'b26, 'c26, 'd26, 'e26, 'f26)** **fmtty\_rel** **-&gt;** **(float -&gt; 'a16, 'b16, 'c16, 'd16, 'e16, 'f16, float -&gt; 'a26, 'b26, 'c26,** **'d26, 'e26, 'f26)** **fmtty\_rel**  
| Bool\_ty **:** **('a17, 'b17, 'c17, 'd17, 'e17, 'f17, 'a27, 'b27, 'c27, 'd27, 'e27, 'f27)** **fmtty\_rel** **-&gt;** **(bool -&gt; 'a17, 'b17, 'c17, 'd17, 'e17, 'f17, bool -&gt; 'a27, 'b27, 'c27, 'd27,** **'e27, 'f27)** **fmtty\_rel**  
| Format\_arg\_ty **:** **('g, 'h, 'i, 'j, 'k, 'l) fmtty** *** ('a18, 'b18, 'c18, 'd18, 'e18, 'f18, 'a28, 'b28, 'c28, 'd28, 'e28, 'f28)** **fmtty\_rel** **-&gt;** **(('g, 'h, 'i, 'j, 'k, 'l) format6 -&gt; 'a18, 'b18,** **'c18, 'd18, 'e18, 'f18,** **('g, 'h, 'i, 'j, 'k, 'l) format6 -&gt; 'a28, 'b28,** **'c28, 'd28, 'e28, 'f28)** **fmtty\_rel**  
| Format\_subst\_ty **:** **('g0, 'h0, 'i0, 'j0, 'k0, 'l0, 'g1, 'b19, 'c19, 'j1, 'd19, 'a19)** **fmtty\_rel** *** ('g0, 'h0, 'i0, 'j0, 'k0, 'l0, 'g2, 'b29, 'c29, 'j2, 'd29, 'a29)** **fmtty\_rel** *** ('a19, 'b19, 'c19, 'd19, 'e19, 'f19, 'a29, 'b29, 'c29, 'd29, 'e29, 'f29)** **fmtty\_rel** **-&gt;** **(('g0, 'h0, 'i0, 'j0, 'k0, 'l0) format6 -&gt; 'g1,** **'b19, 'c19, 'j1, 'e19, 'f19,** **('g0, 'h0, 'i0, 'j0, 'k0, 'l0) format6 -&gt; 'g2,** **'b29, 'c29, 'j2, 'e29, 'f29)** **fmtty\_rel**  
| Alpha\_ty **:** **('a110, 'b110, 'c110, 'd110, 'e110, 'f110, 'a210, 'b210, 'c210, 'd210, 'e210,** **'f210)** **fmtty\_rel** **-&gt;** **(('b110 -&gt; 'x -&gt; 'c110) -&gt; 'x -&gt; 'a110, 'b110, 'c110, 'd110, 'e110, 'f110,** **('b210 -&gt; 'x -&gt; 'c210) -&gt; 'x -&gt; 'a210, 'b210, 'c210, 'd210, 'e210, 'f210)** **fmtty\_rel**  
| Theta\_ty **:** **('a111, 'b111, 'c111, 'd111, 'e111, 'f111, 'a211, 'b211, 'c211, 'd211, 'e211,** **'f211)** **fmtty\_rel** **-&gt;** **(('b111 -&gt; 'c111) -&gt; 'a111, 'b111, 'c111, 'd111, 'e111, 'f111,** **('b211 -&gt; 'c211) -&gt; 'a211, 'b211, 'c211, 'd211, 'e211, 'f211)** **fmtty\_rel**  
| Any\_ty **:** **('a112, 'b112, 'c112, 'd112, 'e112, 'f112, 'a212, 'b212, 'c212, 'd212, 'e212,** **'f212)** **fmtty\_rel** **-&gt;** **('x0 -&gt; 'a112, 'b112, 'c112, 'd112, 'e112, 'f112, 'x0 -&gt; 'a212, 'b212, 'c212,** **'d212, 'e212, 'f212)** **fmtty\_rel**  
| Reader\_ty **:** **('a113, 'b113, 'c113, 'd113, 'e113, 'f113, 'a213, 'b213, 'c213, 'd213, 'e213,** **'f213)** **fmtty\_rel** **-&gt;** **('x1 -&gt; 'a113, 'b113, 'c113, ('b113 -&gt; 'x1) -&gt; 'd113, 'e113, 'f113,** **'x1 -&gt; 'a213, 'b213, 'c213, ('b213 -&gt; 'x1) -&gt; 'd213, 'e213, 'f213)** **fmtty\_rel**  
| Ignored\_reader\_ty **:** **('a114, 'b114, 'c114, 'd114, 'e114, 'f114, 'a214, 'b214, 'c214, 'd214, 'e214,** **'f214)** **fmtty\_rel** **-&gt;** **('a114, 'b114, 'c114, ('b114 -&gt; 'x2) -&gt; 'd114, 'e114, 'f114, 'a214, 'b214,** **'c214, ('b214 -&gt; 'x2) -&gt; 'd214, 'e214, 'f214)** **fmtty\_rel**  
| End\_of\_fmtty **:** **('f115, 'b115, 'c115, 'd115, 'd115, 'f115, 'f215, 'b215, 'c215, 'd215, 'd215,** **'f215)** **fmtty\_rel**

*type* **('a, 'b, 'c, 'd, 'e, 'f)** *fmt* =  
| Char **:** **('a0, 'b0, 'c0, 'd0, 'e0, 'f0) fmt** **-&gt;** **(char -&gt; 'a0, 'b0, 'c0, 'd0, 'e0, 'f0) fmt**  
| Caml\_char **:** **('a1, 'b1, 'c1, 'd1, 'e1, 'f1) fmt** **-&gt;** **(char -&gt; 'a1, 'b1, 'c1, 'd1, 'e1, 'f1) fmt**  
| String **:** **('x, string -&gt; 'a2) padding** *** ('a2, 'b2, 'c2, 'd2, 'e2, 'f2) fmt** **-&gt;** **('x, 'b2, 'c2, 'd2, 'e2, 'f2) fmt**  
| Caml\_string **:** **('x0, string -&gt; 'a3) padding** *** ('a3, 'b3, 'c3, 'd3, 'e3, 'f3) fmt** **-&gt;** **('x0, 'b3, 'c3, 'd3, 'e3, 'f3) fmt**  
| Int **:** **int\_conv** *** ('x1, 'y) padding** *** ('y, int -&gt; 'a4) precision** *** ('a4, 'b4, 'c4, 'd4, 'e4, 'f4) fmt** **-&gt;** **('x1, 'b4, 'c4, 'd4, 'e4, 'f4) fmt**  
| Int32 **:** **int\_conv** *** ('x2, 'y0) padding** *** ('y0, int32 -&gt; 'a5) precision** *** ('a5, 'b5, 'c5, 'd5, 'e5, 'f5) fmt** **-&gt;** **('x2, 'b5, 'c5, 'd5, 'e5, 'f5) fmt**  
| Nativeint **:** **int\_conv** *** ('x3, 'y1) padding** *** ('y1, nativeint -&gt; 'a6) precision** *** ('a6, 'b6, 'c6, 'd6, 'e6, 'f6) fmt** **-&gt;** **('x3, 'b6, 'c6, 'd6, 'e6, 'f6) fmt**  
| Int64 **:** **int\_conv** *** ('x4, 'y2) padding** *** ('y2, int64 -&gt; 'a7) precision** *** ('a7, 'b7, 'c7, 'd7, 'e7, 'f7) fmt** **-&gt;** **('x4, 'b7, 'c7, 'd7, 'e7, 'f7) fmt**  
| Float **:** **float\_conv** *** ('x5, 'y3) padding** *** ('y3, float -&gt; 'a8) precision** *** ('a8, 'b8, 'c8, 'd8, 'e8, 'f8) fmt** **-&gt;** **('x5, 'b8, 'c8, 'd8, 'e8, 'f8) fmt**  
| Bool **:** **('x6, bool -&gt; 'a9) padding** *** ('a9, 'b9, 'c9, 'd9, 'e9, 'f9) fmt** **-&gt;** **('x6, 'b9, 'c9, 'd9, 'e9, 'f9) fmt**  
| Flush **:** **('a10, 'b10, 'c10, 'd10, 'e10, 'f10) fmt** **-&gt;** **('a10, 'b10, 'c10, 'd10, 'e10, 'f10) fmt**  
| String\_literal **:** **string * ('a11, 'b11, 'c11, 'd11, 'e11, 'f11) fmt** **-&gt;** **('a11, 'b11, 'c11, 'd11, 'e11, 'f11) fmt**  
| Char\_literal **:** **char * ('a12, 'b12, 'c12, 'd12, 'e12, 'f12) fmt** **-&gt;** **('a12, 'b12, 'c12, 'd12, 'e12, 'f12) fmt**  
| Format\_arg **:** **pad\_option** *** ('g, 'h, 'i, 'j, 'k, 'l) fmtty** *** ('a13, 'b13, 'c13, 'd13, 'e13, 'f13) fmt** **-&gt;** **(('g, 'h, 'i, 'j, 'k, 'l) format6 -&gt; 'a13, 'b13,** **'c13, 'd13, 'e13, 'f13)** **fmt**  
| Format\_subst **:** **pad\_option** *** ('g0, 'h0, 'i0, 'j0, 'k0, 'l0, 'g2, 'b14, 'c14, 'j2, 'd14, 'a14)** **fmtty\_rel** *** ('a14, 'b14, 'c14, 'd14, 'e14, 'f14) fmt** **-&gt;** **(('g0, 'h0, 'i0, 'j0, 'k0, 'l0) format6 -&gt; 'g2,** **'b14, 'c14, 'j2, 'e14, 'f14)** **fmt**  
| Alpha **:** **('a15, 'b15, 'c15, 'd15, 'e15, 'f15) fmt** **-&gt;** **(('b15 -&gt; 'x7 -&gt; 'c15) -&gt; 'x7 -&gt; 'a15, 'b15, 'c15, 'd15, 'e15, 'f15)** **fmt**  
| Theta **:** **('a16, 'b16, 'c16, 'd16, 'e16, 'f16) fmt** **-&gt;** **(('b16 -&gt; 'c16) -&gt; 'a16, 'b16, 'c16, 'd16, 'e16, 'f16)** **fmt**  
| Formatting\_lit **:** **formatting\_lit** *** ('a17, 'b17, 'c17, 'd17, 'e17, 'f17) fmt** **-&gt;** **('a17, 'b17, 'c17, 'd17, 'e17, 'f17) fmt**  
| Formatting\_gen **:** **('a18, 'b18, 'c18, 'd18, 'e18, 'f18) formatting\_gen** *** ('f18, 'b18, 'c18, 'e18, 'e20, 'f20) fmt** **-&gt;** **('a18, 'b18, 'c18, 'd18, 'e20, 'f20) fmt**  
| Reader **:** **('a19, 'b19, 'c19, 'd19, 'e19, 'f19) fmt** **-&gt;** **('x8 -&gt; 'a19, 'b19, 'c19, ('b19 -&gt; 'x8) -&gt; 'd19, 'e19, 'f19)** **fmt**  
| Scan\_char\_set **:** **pad\_option * char\_set** *** ('a20, 'b20, 'c20, 'd20, 'e21, 'f21) fmt** **-&gt;** **(string -&gt; 'a20, 'b20, 'c20, 'd20, 'e21, 'f21) fmt**  
| Scan\_get\_counter **:** **counter** *** ('a21, 'b21, 'c21, 'd21, 'e22, 'f22) fmt** **-&gt;** **(int -&gt; 'a21, 'b21, 'c21, 'd21, 'e22, 'f22) fmt**  
| Scan\_next\_char **:** **('a22, 'b22, 'c22, 'd22, 'e23, 'f23) fmt** **-&gt;** **(char -&gt; 'a22, 'b22, 'c22, 'd22, 'e23, 'f23) fmt**  
| Ignored\_param **:** **('a23, 'b23, 'c23, 'd23, 'y4, 'x9) ignored** *** ('x9, 'b23, 'c23, 'y4, 'e24, 'f24) fmt** **-&gt;** **('a23, 'b23, 'c23, 'd23, 'e24, 'f24) fmt**  
| Custom **:** **('a24, 'x10, 'y5) custom\_arity * (unit -&gt; 'x10)** *** ('a24, 'b24, 'c24, 'd24, 'e25, 'f25) fmt** **-&gt;** **('y5, 'b24, 'c24, 'd24, 'e25, 'f25) fmt**  
| End\_of\_format **:** **('f26, 'b25, 'c25, 'e26, 'e26, 'f26) fmt**

List of format elements.

*type* **('a, 'b, 'c, 'd, 'e, 'f)** *ignored* =  
| Ignored\_char **:** **('a0, 'b0, 'c0, 'd0, 'd0, 'a0) ignored**  
| Ignored\_caml\_char **:** **('a1, 'b1, 'c1, 'd1, 'd1, 'a1) ignored**  
| Ignored\_string **:** **pad\_option** **-&gt;** **('a2, 'b2, 'c2, 'd2, 'd2, 'a2) ignored**  
| Ignored\_caml\_string **:** **pad\_option** **-&gt;** **('a3, 'b3, 'c3, 'd3, 'd3, 'a3) ignored**  
| Ignored\_int **:** **int\_conv * pad\_option** **-&gt;** **('a4, 'b4, 'c4, 'd4, 'd4, 'a4) ignored**  
| Ignored\_int32 **:** **int\_conv * pad\_option** **-&gt;** **('a5, 'b5, 'c5, 'd5, 'd5, 'a5) ignored**  
| Ignored\_nativeint **:** **int\_conv * pad\_option** **-&gt;** **('a6, 'b6, 'c6, 'd6, 'd6, 'a6) ignored**  
| Ignored\_int64 **:** **int\_conv * pad\_option** **-&gt;** **('a7, 'b7, 'c7, 'd7, 'd7, 'a7) ignored**  
| Ignored\_float **:** **pad\_option * prec\_option** **-&gt;** **('a8, 'b8, 'c8, 'd8, 'd8, 'a8) ignored**  
| Ignored\_bool **:** **pad\_option** **-&gt;** **('a9, 'b9, 'c9, 'd9, 'd9, 'a9) ignored**  
| Ignored\_format\_arg **:** **pad\_option** *** ('g, 'h, 'i, 'j, 'k, 'l) fmtty** **-&gt;** **('a10, 'b10, 'c10, 'd10, 'd10, 'a10) ignored**  
| Ignored\_format\_subst **:** **pad\_option** *** ('a11, 'b11, 'c11, 'd11, 'e0, 'f0) fmtty** **-&gt;** **('a11, 'b11, 'c11, 'd11, 'e0, 'f0) ignored**  
| Ignored\_reader **:** **('a12, 'b12, 'c12, ('b12 -&gt; 'x) -&gt; 'd12, 'd12, 'a12)** **ignored**  
| Ignored\_scan\_char\_set **:** **pad\_option * char\_set** **-&gt;** **('a13, 'b13, 'c13, 'd13, 'd13, 'a13) ignored**  
| Ignored\_scan\_get\_counter **:** **counter** **-&gt;** **('a14, 'b14, 'c14, 'd14, 'd14, 'a14) ignored**  
| Ignored\_scan\_next\_char **:** **('a15, 'b15, 'c15, 'd15, 'd15, 'a15) ignored**

*type* **('a, 'b, 'c, 'd, 'e, 'f)** *format6* =  
| Format **of** **('a, 'b, 'c, 'd, 'e, 'f) fmt * string**

*val concat\_fmtty* : **('g1, 'b1, 'c1, 'j1, 'd1, 'a1, 'g2, 'b2, 'c2, 'j2, 'd2, 'a2)** **fmtty\_rel -&gt;** **('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2)** **fmtty\_rel -&gt;** **('g1, 'b1, 'c1, 'j1, 'e1, 'f1, 'g2, 'b2, 'c2, 'j2, 'e2, 'f2)** **fmtty\_rel**

*val erase\_rel* : **('a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l)** **fmtty\_rel -&gt;** **('a, 'b, 'c, 'd, 'e, 'f) fmtty**

*val concat\_fmt* : **('a, 'b, 'c, 'd, 'e, 'f) fmt -&gt;** **('f, 'b, 'c, 'e, 'g, 'h) fmt -&gt;** **('a, 'b, 'c, 'd, 'g, 'h) fmt**

2026-09-15 OCamldoc

---

Document: CamlinternalFormatBasics(3o) from ocaml-4 4.14.4-r3 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
