Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. fromIntegerDecimalBounded :: forall m r (s :: Nat) p . (MonadThrow m, Integral p, Bounded p) => Decimal r s Integer -> m (Decimal r s p)

    safe-decimal Numeric.Decimal

    No documentation available.

  2. fromIntegerDecimalBoundedIntegral :: forall m r (s :: Nat) p . (MonadThrow m, Integral p, Bounded p, KnownNat s) => Integer -> m (Decimal r s p)

    safe-decimal Numeric.Decimal

    Convert an Integer to a Decimal backed by a bounded integral while doing proper scaling and checking the bounds.

  3. fromIntegralDecimalBounded :: forall p (s :: Nat) m r . (Integral p, Bounded p, KnownNat s, MonadThrow m) => p -> m (Decimal r s p)

    safe-decimal Numeric.Decimal

    Convert a bounded integeral into a decimal, while performing the necessary scaling

    >>> import Numeric.Decimal
    
    >>> fromIntegralDecimalBounded 1234 :: IO (Decimal RoundHalfUp 4 Int)
    1234.0000
    
    >>> fromIntegralDecimalBounded 1234 :: IO (Decimal RoundHalfUp 4 Int16)
    *** Exception: arithmetic overflow
    

  4. fromRationalDecimalBoundedWithRounding :: forall m r (s :: Nat) p . (MonadThrow m, KnownNat s, Round r Integer, Bounded p, Integral p) => Rational -> m (Decimal r s p)

    safe-decimal Numeric.Decimal

    No documentation available.

  5. fromRationalDecimalBoundedWithoutLoss :: forall m (s :: Nat) p r . (MonadThrow m, KnownNat s, Integral p, Bounded p) => Rational -> m (Decimal r s p)

    safe-decimal Numeric.Decimal

    Convert a Rational to a bounded Decimal, but only if there is no precision loss or Overflow/Undeflow.

  6. fromScientificDecimalBounded :: forall m r (s :: Nat) p . (MonadThrow m, Integral p, Bounded p, KnownNat s) => Scientific -> m (Decimal r s p)

    safe-decimal Numeric.Decimal

    Convert from Scientific to bounded Decimal while checking for Overflow/Underflow

  7. integralDecimalToDecimalBounded :: forall p' p (s :: Nat) m r . (Integral p', Integral p, Bounded p, KnownNat s, MonadThrow m) => Decimal r s p' -> m (Decimal r s p)

    safe-decimal Numeric.Decimal

    Convert a decimal backed by an integral to another decimal backed by a bounded integeral, while checking for Overflow/Underflow

    >>> import Numeric.Decimal
    
    >>> fromIntegralDecimalBounded 1234 :: IO (Decimal RoundHalfUp 4 Int)
    1234.0000
    
    >>> fromIntegralDecimalBounded 1234 :: IO (Decimal RoundHalfUp 4 Int16)
    *** Exception: arithmetic overflow
    

  8. minusDecimalBounded :: forall m p r (s :: Nat) . (MonadThrow m, Eq p, Ord p, Num p, Bounded p) => Decimal r s p -> Decimal r s p -> m (Decimal r s p)

    safe-decimal Numeric.Decimal

    Subtract two decimal numbers.

  9. parseDecimalBounded :: forall r (s :: Nat) p . (KnownNat s, Bounded p, Integral p) => Bool -> String -> Either String (Decimal r s p)

    safe-decimal Numeric.Decimal

    No documentation available.

  10. plusDecimalBounded :: forall m p r (s :: Nat) . (MonadThrow m, Eq p, Ord p, Num p, Bounded p) => Decimal r s p -> Decimal r s p -> m (Decimal r s p)

    safe-decimal Numeric.Decimal

    Add two decimal numbers.

Page 44 of many | Previous | Next