Unit(3) OCaml library Unit(3)

# [NAME](#NAME)

Unit - Unit values.

# [Module](#Module)

Module Unit

# [Documentation](#Documentation)

Module **Unit**  
: **sig end**

Unit values.

**Since** 4.08

## [The unit type](#The_unit_type)

*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 -&gt; t -&gt; bool**

**equal u1 u2** is **true** .

*val compare* : **t -&gt; t -&gt; int**

**compare u1 u2** is **0** .

*val to\_string* : **t -&gt; string**

**to\_string b** is **"()"** .

2026-10-27 OCamldoc

---

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