Hoogle Search

Within Stackage Nightly 2025-10-02 (ghc-9.12.2)

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

  1. amountSetFullPrecisionUpTo :: Maybe Word8 -> Amount -> Amount

    hledger-lib Hledger.Data.Amount

    We often want to display "infinite decimal" amounts rounded to some readable number of digits, while still displaying amounts with a large but "non infinite" number of decimal digits (eg 10 or 100 or 200 digits) in full. This helper is like amountSetFullPrecision, but with some refinements:

    1. A maximum display precision can be specified, setting a hard upper limit.
    2. If no limit is specified, and the internal precision is the maximum (255), indicating an infinite decimal, display precision is set to a smaller default (8).
    This function always sets an explicit display precision (ie, Precision n).

  2. amountSetPrecision :: AmountPrecision -> Amount -> Amount

    hledger-lib Hledger.Data.Amount

    Set an amount's display precision.

  3. amountSetPrecisionMax :: Word8 -> Amount -> Amount

    hledger-lib Hledger.Data.Amount

    Ensure an amount's display precision is at most the given maximum precision. Always sets an explicit Precision.

  4. amountSetPrecisionMin :: Word8 -> Amount -> Amount

    hledger-lib Hledger.Data.Amount

    Ensure an amount's display precision is at least the given minimum precision. Always sets an explicit Precision.

  5. amountSetStyles :: Map CommoditySymbol AmountStyle -> Amount -> Amount

    hledger-lib Hledger.Data.Amount

    Deprecated: please use styleAmounts instead

  6. amountStyleSetRounding :: Rounding -> AmountStyle -> AmountStyle

    hledger-lib Hledger.Data.Amount

    Set this amount style's rounding strategy when it is being applied to amounts.

  7. amountStylesSetRounding :: Rounding -> Map CommoditySymbol AmountStyle -> Map CommoditySymbol AmountStyle

    hledger-lib Hledger.Data.Amount

    Set these amount styles' rounding strategy when they are being applied to amounts.

  8. mixedAmountSetFullPrecision :: MixedAmount -> MixedAmount

    hledger-lib Hledger.Data.Amount

    In each component amount, increase the display precision sufficiently to render it exactly (showing all significant decimal digits).

  9. mixedAmountSetFullPrecisionUpTo :: Maybe Word8 -> MixedAmount -> MixedAmount

    hledger-lib Hledger.Data.Amount

    In each component amount, increase the display precision sufficiently to render it exactly if possible, but not more than the given max precision, and if no max precision is given and the amount has infinite decimals, limit display precision to a hard-coded smaller number (8). See amountSetFullPrecisionUpTo.

  10. mixedAmountSetPrecision :: AmountPrecision -> MixedAmount -> MixedAmount

    hledger-lib Hledger.Data.Amount

    Set the display precision in the amount's commodities.

Page 111 of many | Previous | Next