Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data RoundingMode
- oppositeRoundingMode :: RoundingMode -> RoundingMode
- class Rounding (r :: RoundingMode)
- rounding :: Rounding r => proxy r -> RoundingMode
- reifyRounding :: RoundingMode -> (forall s. Rounding s => Proxy s -> a) -> a
Documentation
data RoundingMode Source #
The type for IEEE754 rounding-direction attributes.
ToNearest | Round to the nearest value (IEEE754 roundTiesToEven) |
TowardNegInf | Round downward (IEEE754 roundTowardNegative) |
TowardInf | Round upward (IEEE754 roundTowardPositive) |
TowardZero | Round toward zero (IEEE754 roundTowardZero) |
Instances
oppositeRoundingMode :: RoundingMode -> RoundingMode Source #
Returns the opposite rounding direction.
TowardNegInf
and TowardInf
are swapped.
class Rounding (r :: RoundingMode) Source #
This class allows you to recover the runtime value from a type-level rounding mode.
See rounding
.
roundingT
rounding :: Rounding r => proxy r -> RoundingMode Source #
Recovers the value from type-level rounding mode.
reifyRounding :: RoundingMode -> (forall s. Rounding s => Proxy s -> a) -> a Source #
Lifts a rounding mode to type-level.