Misc.Style(3)
β¨ NAME β¨
okay bestie, welcome to Misc.Style(3) from the OCaml library π
Misc.Style β no description.
No cap, the original page literally says βno description,β and we are not gonna invent one. The silence is iconic. π
π Module π
Module Misc.Style
That's the module name, periodt. π«Ά
π Documentation π
Module Style : sig end
Yes bestie, the signature is literally sig end β we respect the minimalist queen energy. π
Here's the color type, full rainbow-cafeteria realness:
type color =
| Black
| Red
| Green
| Yellow
| Blue
| Magenta
| Cyan
| White
And the style type, with all its variants exactly as listed:
type style =
| FG of color
| BG of color
| Bold
| Reset
Then we've got this extension of Format.stag, and the constructor is Style of style list:
type Format.stag +=
| Style of style list
The ansi_of_style_l signature is giving style list -> string:
val ansi_of_style_l : style list -> string
Now the tag_style record β three fields, all accounted for:
type tag_style = {
ansi : style list ;
text_open : string ;
text_close : string ;
}
And the styles record, with every field in its original order:
type styles = {
error : tag_style ;
warning : tag_style ;
loc : tag_style ;
hint : tag_style ;
inline_code : tag_style ;
}
The rest of the vals, bestie β signatures stay exactly as the page says:
val hint : Format_doc.formatter -> unitβ formatter in,unitout, that's the shape.val as_inline_code : 'a Format_doc.printer -> 'a Format_doc.printerβ printer in, printer out, same'a.val inline_code : string Format_doc.printerβ literally astring Format_doc.printer.val default_styles : stylesβ astylesvalue, no extra lore.val get_styles : unit -> stylesβunitin,stylesout.val set_styles : styles -> unitβstylesin,unitout.val setup : Misc.Color.setting option -> unitβ takes aMisc.Color.setting option, gives backunit.val set_tag_handling : Format.formatter -> unitβ takes aFormat.formatter, gives backunit.
this lil' page came from OCamldoc, dated 2026-06-22, and it's the Misc.Style(3) page β bye bestie, go slay some formatting π
β¨π«Ά
π¦ where this page comes from
- arch rolling: ocaml 5.5.0-1 Β· LGPL2.1 AND custom: QPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms