Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides various "infinite" wrappers, which can provide a detectable infinity to an otherwise non-infinite type.
- class HasPositiveInfinity a where
- class HasNegativeInfinity a where
- data NegativeInfinite a
- = NegativeInfinity
- | NegFinite !a
- data PositiveInfinite a
- = PosFinite !a
- | PositiveInfinity
- data Infinite a
Documentation
class HasPositiveInfinity a where Source #
A class for semirings with a concept of "infinity". It's important that
this isn't regarded as the same as "bounded":
x
should probably equal <+>
positiveInfinity
positiveInfinity
.
positiveInfinity :: a Source #
A positive infinite value
isPositiveInfinity :: a -> Bool Source #
Test if a value is positive infinity.
class HasNegativeInfinity a where Source #
A class for semirings with a concept of "negative infinity". It's important
that this isn't regarded as the same as "bounded":
x
should probably equal <+>
negativeInfinity
negativeInfinity
.
negativeInfinity :: a Source #
A negative infinite value
isNegativeInfinity :: a -> Bool Source #
Test if a value is negative infinity.
data NegativeInfinite a Source #
Adds negative infinity to a type. Useful for expressing detectable infinity
in types like Integer
, etc.
data PositiveInfinite a Source #
Adds positive infinity to a type. Useful for expressing detectable infinity
in types like Integer
, etc.
Adds positive and negative infinity to a type. Useful for expressing
detectable infinity in types like Integer
, etc.