Stdlib.Unit(3)
okay so we're in the OCaml library manual, and this page is Stdlib.Unit(3) β come on, bestie, it's unit type time π
β¨
π NAME π
Stdlib.Unit β literally no description, no cap π«Ά
π¦ Module π¦
The module line is giving:
Module Stdlib.Unit
π Documentation π
Under Documentation, we got Module Unit pointing at:
Module Unit
: (module Stdlib__Unit)
πΈ The unit type πΈ
The type is exactly this, bestie:
type t = unit =
| ()
It is The unit type. Iconic. Main character energy fr fr β¨
The constructor () is included here so that it has a path, but it is not intended to be used in user-defined data types. Like, it's there for path reasons, not for you to go build your own little data types with it π
val equal : t -> t -> boolβequal u1 u2istrue. That's it, that's the vibe βval compare : t -> t -> intβcompare u1 u2is0. Zero. Nothing. Chill π§val to_string : t -> stringβto_string bis"()". It literally turns into those two parentheses, and honestly? slay π
This little page was brought to you by OCamldoc, dated 2026-06-22, for Stdlib.Unit(3) ππ«Ά
π¦ 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