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.
amountSetFullPrecisionUpTo :: Maybe Word8 -> Amount -> Amounthledger-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:
- A maximum display precision can be specified, setting a hard upper limit.
- 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).
amountSetPrecision :: AmountPrecision -> Amount -> Amounthledger-lib Hledger.Data.Amount Set an amount's display precision.
amountSetPrecisionMax :: Word8 -> Amount -> Amounthledger-lib Hledger.Data.Amount Ensure an amount's display precision is at most the given maximum precision. Always sets an explicit Precision.
amountSetPrecisionMin :: Word8 -> Amount -> Amounthledger-lib Hledger.Data.Amount Ensure an amount's display precision is at least the given minimum precision. Always sets an explicit Precision.
amountSetStyles :: Map CommoditySymbol AmountStyle -> Amount -> Amounthledger-lib Hledger.Data.Amount Deprecated: please use styleAmounts instead
amountStyleSetRounding :: Rounding -> AmountStyle -> AmountStylehledger-lib Hledger.Data.Amount Set this amount style's rounding strategy when it is being applied to amounts.
-
hledger-lib Hledger.Data.Amount Set these amount styles' rounding strategy when they are being applied to amounts.
mixedAmountSetFullPrecision :: MixedAmount -> MixedAmounthledger-lib Hledger.Data.Amount In each component amount, increase the display precision sufficiently to render it exactly (showing all significant decimal digits).
mixedAmountSetFullPrecisionUpTo :: Maybe Word8 -> MixedAmount -> MixedAmounthledger-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.
mixedAmountSetPrecision :: AmountPrecision -> MixedAmount -> MixedAmounthledger-lib Hledger.Data.Amount Set the display precision in the amount's commodities.