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. pevalDefaultQuotBoundedIntegralTerm :: (PEvalDivModIntegralTerm a, Bounded a, Integral a) => Term a -> Term a -> Term a

    grisette Grisette.Internal.SymPrim.Prim.Internal.Instances.PEvalDivModIntegralTerm

    Default partial evaluation of quotient operation for bounded integral types.

  2. compileBounded :: Int -> RE c a -> Maybe (Parser c a)

    parser-regex Regex.Base

    Compile a RE c a to a Parser c a. Returns Nothing if the size of the RE is greater than the provided limit <math>. You may want to use this if you suspect that the RE may be too large, for instance if the regex is constructed from an untrusted source. While the exact size of a RE depends on an internal representation, it can be assumed to be in the same order as the length of a regex pattern corresponding to the RE.

  3. compileBounded :: Int -> RE c a -> Maybe (Parser c a)

    parser-regex Regex.Internal.Parser

    Compile a RE c a to a Parser c a. Returns Nothing if the size of the RE is greater than the provided limit <math>. You may want to use this if you suspect that the RE may be too large, for instance if the regex is constructed from an untrusted source. While the exact size of a RE depends on an internal representation, it can be assumed to be in the same order as the length of a regex pattern corresponding to the RE.

  4. compileBounded :: Int -> RE c a -> Maybe (Parser c a)

    parser-regex Regex.List

    Compile a RE c a to a Parser c a. Returns Nothing if the size of the RE is greater than the provided limit <math>. You may want to use this if you suspect that the RE may be too large, for instance if the regex is constructed from an untrusted source. While the exact size of a RE depends on an internal representation, it can be assumed to be in the same order as the length of a regex pattern corresponding to the RE.

  5. compileBounded :: Int -> RE c a -> Maybe (Parser c a)

    parser-regex Regex.Text

    Compile a RE c a to a Parser c a. Returns Nothing if the size of the RE is greater than the provided limit <math>. You may want to use this if you suspect that the RE may be too large, for instance if the regex is constructed from an untrusted source. While the exact size of a RE depends on an internal representation, it can be assumed to be in the same order as the length of a regex pattern corresponding to the RE.

  6. Unbounded :: Bound a

    postgresql-typed Database.PostgreSQL.Typed.Range

    Equivalent to Bounded False ±Infinity

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

    safe-decimal Numeric.Decimal

    Compute absolute value of a bounded decimal. Protects against overflows for negative minBound.

    >>> abs (minBound :: Int8)
    -128
    
    >>> import Numeric.Decimal
    
    >>> d <- arithM (fromRational (-1.28) :: Arith (Decimal RoundHalfUp 2 Int8))
    
    >>> d
    -1.28
    
    >>> absDecimalBounded d :: Either SomeException (Decimal RoundHalfUp 2 Int8)
    Left arithmetic overflow
    
    Note - Watch out for order of negation
    >>> -1.28 :: Arith (Decimal RoundHalfUp 2 Int8)
    ArithError arithmetic overflow
    
    >>> negate (1.28 :: Arith (Decimal RoundHalfUp 2 Int8))
    ArithError arithmetic overflow
    
    >>> :set -XNegativeLiterals
    
    >>> -1.28 :: Arith (Decimal RoundHalfUp 2 Int8)
    Arith -1.28
    

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

    safe-decimal Numeric.Decimal

    No documentation available.

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

    safe-decimal Numeric.Decimal

    Divide two decimal numbers that have the same scale, while throwing PrecisionLoss whenever division cannot be done without rounding.

  10. fromFixedDecimalBounded :: forall (s :: Nat) e m p r . (s ~ FixedScale e, MonadThrow m, Integral p, Bounded p) => Fixed e -> m (Decimal r s p)

    safe-decimal Numeric.Decimal

    Convert a Fixed to a decimal backed by a bounded integral with the exactly same precision

    >>> fromFixedDecimalBounded (123.458 :: Fixed E3) :: Arith (Decimal RoundToZero 3 Int)
    Arith 123.458
    
    >>> fromFixedDecimalBounded (123.458 :: Fixed E3) :: Arith (Decimal RoundToZero 3 Int8)
    ArithError arithmetic overflow
    
    >>> fromFixedDecimalBounded (-123.458 :: Fixed E3) :: Arith (Decimal RoundToZero 3 Word)
    ArithError arithmetic underflow
    

Page 43 of many | Previous | Next