| Portability | portable |
|---|---|
| Stability | experimental |
| Maintainer | divip@aszt.inf.elte.hu |
Number.Peano.Inf
Description
Lazy Peano numbers including observable infinity value.
Note that the following equation does not hold for this number type:
-
1 + a > a, because1 + infinity == infinity.
The following operation is undefined:
infinity - infinity
There are variants of (-) with different behaviour regarding this, see below.
The following operations are naturally undefined:
fromEnum infinity
toInteger infinity
-
0 - n, ifn > 0 -
fromInteger n, ifn < 0 -
toEnum n, ifn < 0 pred 0
Documentation
Natural numbers and infinity.
Difference of two natural numbers: the result is either positive or negative.
Variant of diff: zeroDiff infinity infinity == Left 0.
Variant of diff: infDiff infinity infinity == Left infinity.