Provides a type for natural numbers.
- data Natural
The type of natural numbers.
Note that matching a natural number against a negative pattern might not work as you expect.
For example, evaluating the following expression results in a run-time error, instead of the
case 5 :: Natural of -5 -> "minus five" 5 -> "plus five"
The reason is that the
== operator of
Natural is used for checking if the patterns
match, making it necessary to convert
-5 to Natural.