Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides various "infinite" wrappers, which can provide a detectable infinity to an otherwise non-infinite type.
Synopsis
- class HasPositiveInfinity a where
- positiveInfinity :: a
- isPositiveInfinity :: a -> Bool
- class HasNegativeInfinity a where
- negativeInfinity :: a
- isNegativeInfinity :: a -> Bool
- 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.
Instances
HasPositiveInfinity Double Source # | |
Defined in Data.Semiring positiveInfinity :: Double Source # isPositiveInfinity :: Double -> Bool Source # | |
HasPositiveInfinity Float Source # | |
Defined in Data.Semiring positiveInfinity :: Float Source # isPositiveInfinity :: Float -> Bool Source # | |
HasPositiveInfinity CFloat Source # | |
Defined in Data.Semiring positiveInfinity :: CFloat Source # isPositiveInfinity :: CFloat -> Bool Source # | |
HasPositiveInfinity CDouble Source # | |
Defined in Data.Semiring | |
HasPositiveInfinity (Infinite a) Source # | |
Defined in Data.Semiring.Infinite positiveInfinity :: Infinite a Source # isPositiveInfinity :: Infinite a -> Bool Source # | |
HasPositiveInfinity (PositiveInfinite a) Source # | |
Defined in Data.Semiring.Infinite |
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.
Instances
HasNegativeInfinity Double Source # | |
Defined in Data.Semiring negativeInfinity :: Double Source # isNegativeInfinity :: Double -> Bool Source # | |
HasNegativeInfinity Float Source # | |
Defined in Data.Semiring negativeInfinity :: Float Source # isNegativeInfinity :: Float -> Bool Source # | |
HasNegativeInfinity CFloat Source # | |
Defined in Data.Semiring negativeInfinity :: CFloat Source # isNegativeInfinity :: CFloat -> Bool Source # | |
HasNegativeInfinity CDouble Source # | |
Defined in Data.Semiring | |
HasNegativeInfinity (Infinite a) Source # | |
Defined in Data.Semiring.Infinite negativeInfinity :: Infinite a Source # isNegativeInfinity :: Infinite a -> Bool Source # | |
HasNegativeInfinity (NegativeInfinite a) Source # | |
Defined in Data.Semiring.Infinite |
data NegativeInfinite a Source #
Adds negative infinity to a type. Useful for expressing detectable infinity
in types like Integer
, etc.
Instances
data PositiveInfinite a Source #
Adds positive infinity to a type. Useful for expressing detectable infinity
in types like Integer
, etc.
Instances
Adds positive and negative infinity to a type. Useful for expressing
detectable infinity in types like Integer
, etc.