Stdlib.Unit(3) OCaml library Stdlib.Unit(3)

# [NAME](#NAME)

Stdlib.Unit - no description

# [Module](#Module)

Module Stdlib.Unit

# [Documentation](#Documentation)

Module **Unit**  
: **(module Stdlib\_\_Unit)**

## [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-09-04 OCamldoc

---

Document: Stdlib.Unit(3o) from ocaml 5.5.1-r0 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
