| Copyright | (c) Michal Konecny |
|---|---|
| License | BSD3 |
| Maintainer | mikkonecny@gmail.com |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
AERN2.MP.WithCurrentPrec
Description
Type wrapper setting default precision.
Not suitable for use with MixedTypesNumPrelude since we need binary operators to enforce the same precision on both operands via the equality of their types.
Borrowed some tricks from https://github.com/ekmett/rounded/blob/master/src/Numeric/Rounded/Precision.hs
Documentation
newtype WithCurrentPrec t p Source #
Constructors
| WithCurrentPrec | |
Fields
| |
Instances
runWithPrec :: Precision -> (forall n. KnownNat n => WithCurrentPrec t n) -> t Source #
class HasCurrentPrecision p where Source #
Methods
getCurrentPrecision :: proxy p -> Precision Source #
Instances
| KnownNat n => HasCurrentPrecision (n :: Nat) Source # | |
Defined in AERN2.MP.WithCurrentPrec Methods getCurrentPrecision :: proxy n -> Precision Source # | |