Copyright | (c) Michal Konecny |
---|---|
License | BSD3 |
Maintainer | mikkonecny@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
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 #
Instances
runWithPrec :: Precision -> (forall n. KnownNat n => WithCurrentPrec t n) -> t Source #
class HasCurrentPrecision p where Source #
getCurrentPrecision :: proxy p -> Precision Source #
Instances
KnownNat n => HasCurrentPrecision (n :: Nat) Source # | |
Defined in AERN2.MP.WithCurrentPrec getCurrentPrecision :: proxy n -> Precision Source # |