OS Manuals

Unit(3o)

Unit - Unit values.

Unit(3) OCaml library Unit(3)

Unit - Unit values.

Module Unit

Module Unit
: sig end

Unit values.

Since 4.08

type t = unit =
| ()

The unit type.

The constructor () is included here so that it has a path, but it is not intended to be used in user-defined data types.

val equal : t -> t -> bool

equal u1 u2 is true .

val compare : t -> t -> int

compare u1 u2 is 0 .

val to_string : t -> string

to_string b is "()" .

2026-10-01 OCamldoc

ocaml 5.5.1-r1 · os · ingested 2026-10-02