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.
-
hledger-lib Hledger.Data.Period Render a period as a compact display string suitable for user output.
>>> showPeriod (WeekPeriod (fromGregorian 2016 7 25)) "2016-W30" >>> showPeriod (WeekPeriod (fromGregorian 2024 12 30)) "2025-W01"
showPeriodAbbrev :: Period -> Texthledger-lib Hledger.Data.Period Like showPeriod, but if it's a month or week period show an abbreviated form. >>> showPeriodAbbrev (WeekPeriod (fromGregorian 2016 7 25)) W30 >>> showPeriodAbbrev (WeekPeriod (fromGregorian 2024 12 30)) W01
showAccountName :: Maybe Int -> PostingType -> AccountName -> Texthledger-lib Hledger.Data.Posting Show an account name, clipped to the given width if any, and appropriately bracketed/parenthesised for the given posting type.
showBalanceAssertion :: BalanceAssertion -> WideBuilderhledger-lib Hledger.Data.Posting Render a balance assertion, as the =[=][*] symbol and expected amount.
showPosting :: Posting -> Stringhledger-lib Hledger.Data.Posting No documentation available.
showPostingLines :: Posting -> [Text]hledger-lib Hledger.Data.Posting Render a posting, at the appropriate width for aligning with its siblings if any. Used by the rewrite command.
showTransaction :: Transaction -> Texthledger-lib Hledger.Data.Transaction Render a journal transaction as text similar to the style of Ledger's print command. Adapted from Ledger 2.x and 3.x standard format:
yyyy-mm-dd[ *][ CODE] description......... [ ; comment...............] account name 1..................... ...$amount1[ ; comment...............] account name 2..................... ..$-amount1[ ; comment...............] pcodewidth = no limit -- 10 -- mimicking ledger layout. pdescwidth = no limit -- 20 -- I don't remember what these mean, pacctwidth = 35 minimum, no maximum -- they were important at the time. pamtwidth = 11 pcommentwidth = no limit -- 22
The output will be parseable journal syntax. To facilitate this, postings with explicit multi-commodity amounts are displayed as multiple similar postings, one per commodity. (Normally does not happen with this function).showTransactionLineFirstPart :: Transaction -> Texthledger-lib Hledger.Data.Transaction No documentation available.
showTransactionOneLineAmounts :: Transaction -> Texthledger-lib Hledger.Data.Transaction Like showTransaction, but explicit multi-commodity amounts are shown on one line, comma-separated. In this case the output will not be parseable journal syntax.
showMarketPrice :: MarketPrice -> Stringhledger-lib Hledger.Data.Types No documentation available.