unit formats unit literals.
bool formats bool literals.
int formats int literals. Warning. Values formatted on a 64-bit platform may not parse on 32-bit platforms.
int32 formats signed int32 literals.
uint32 formats unsigned int32 literals (i.e. as hexadecimal).
int64 formats signed int64 literals.
uint64 formats unsigned int64 literals (i.e. as hexadecimal).
nativeint formats signed nativeint literals.
nativeuint formats unsigned nativeint literals (i.e. as hexadecimal).
float formats float literals (using "%F").
float formats hex float literals (using "%#F").
Chars and strings
FIXME. Can we make the string combinators multi line ?
char formats char literals as follows:
Char.Ascii.is_print except single quote and slash are printed verbatim.- Characters
'\'', '\\', '\n', '\r' and '\t' are printed just as written here. - Other charactres use hex escapes
'\xhh'.
ascii_string formats string literals using char, except that double quotes are escaped and single quotes are not.
string formats string literals. Assumes an UTF-8 encoded string but escapes:
- Double quotes.
- C0 control characters (U+0000-U+001F)
- C1 control characters (U+0080-U+009F)
- Line separator (U+2028) and paragraph separator (U+2029).
- UTF-8 decode errors by hex escapes
\xhh.
binary_string formats binary string literals. All characters are formatted using \xhh escapes.
Parametric types
Note. Depending on what you print an enclosing parens may be due on the arguments.
option formats option literals.
either formats Either.t literals.
result ~ok ~error formats result literals.
list formats list literals.
array formats array literals.
pair formats pair literals.
Sourceval t3 : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t Sourceval t4 : 'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t Sourceval t5 : 'a t -> 'b t -> 'c t -> 'd t -> 'e t -> ('a * 'b * 'c * 'd * 'e) t Sourceval t6 :
'a t ->
'b t ->
'c t ->
'd t ->
'e t ->
'f t ->
('a * 'b * 'c * 'd * 'e * 'f) t