summaryrefslogtreecommitdiff
path: root/manual/src/refman/extensions/emptyvariants.etex
blob: 541d09dddab54eb1e258d2d121f663fbebb7e528 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
\begin{syntax}
type-representation:
          ...
        | '=' '|'
\end{syntax}
This extension allows user to define empty variants.
Empty variant type can be eliminated by refutation case of pattern matching.
\begin{caml_example*}{verbatim}
type t = |
let f (x: t) = match x with _ -> .
\end{caml_example*}