Hoogle Search
Within LTS Haskell 24.19 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
showAmountWithZeroCommodity :: Amount -> Stringhledger-lib Hledger.Data.Amount Like showAmount, but show a zero amount's commodity if it has one.
showAmountWithZeroCommodity = wbUnpack . showAmountB defaultFmt{displayZeryCommodity=True}showAmountWithoutCost :: Amount -> Stringhledger-lib Hledger.Data.Amount Get the string representation of an amount, without any @ cost.
showAmountWithoutCost = wbUnpack . showAmountB noCostFmt
showCommoditySymbol :: Text -> Texthledger-lib Hledger.Data.Amount Show space-containing commodity symbols quoted, as they are in a journal.
showMixedAmount :: MixedAmount -> Stringhledger-lib Hledger.Data.Amount Render a mixed amount using its amount display styles and the default amount format, after normalising it (to at most one amount in each of its commodities). See showMixedAmountB for special cases.
showMixedAmountB :: AmountFormat -> MixedAmount -> WideBuilderhledger-lib Hledger.Data.Amount Render a mixed amount using its amount display styles and the given amount format, as a builder for efficiency. (This can be converted to a Text with wbToText or to a String with wbUnpack). Warning: this (and its showMixedAmount aliases above) basically assumes amounts have no costs. It can show misleading costs or not show costs which are there. If a maximum width is given then:
- If displayed on one line, it will display as many Amounts as can fit in the given width, and further Amounts will be elided. There will always be at least one amount displayed, even if this will exceed the requested maximum width.
- If displayed on multiple lines, any Amounts longer than the maximum width will be elided.
showMixedAmountDebug :: MixedAmount -> Stringhledger-lib Hledger.Data.Amount Get an unambiguous string representation of a mixed amount for debugging.
showMixedAmountElided :: Int -> Bool -> MixedAmount -> Stringhledger-lib Hledger.Data.Amount Like showMixedAmountOneLineWithoutCost, but show at most the given width, with an elision indicator if there are more. With a True argument, adds ANSI codes to show negative amounts in red. See showMixedAmountB for special cases.
showMixedAmountLinesB :: AmountFormat -> MixedAmount -> [WideBuilder]hledger-lib Hledger.Data.Amount Helper for showMixedAmountB (and postingAsLines, ...) to show a list of Amounts on multiple lines. This returns the list of WideBuilders: one for each Amount, and padded/elided to the appropriate width. This does not honour displayOneLine; all amounts will be displayed as if displayOneLine were False.
showMixedAmountLinesPartsB :: AmountFormat -> MixedAmount -> [(WideBuilder, Amount)]hledger-lib Hledger.Data.Amount Like showMixedAmountLinesB but also returns the amounts associated with each text builder.
showMixedAmountOneLine :: MixedAmount -> Stringhledger-lib Hledger.Data.Amount Get the one-line string representation of a mixed amount (also showing any costs). See showMixedAmountB for special cases.