Chapter 8 Language extensions
This chapter describes language extensions and convenience features that are implemented in OCaml, but not described in the OCaml reference manual.
20 Empty variant types
(Introduced in 4.07.0)
|
This extension allows user to define empty variants. Empty variant type can be eliminated by refutation case of pattern matching.
type t = |
let f (x: t) = match x with _ -> .
The present documentation is copyright Institut National de Recherche en Informatique et en Automatique (INRIA). A complete version can be obtained from this page.