From 4c9f0e5d9eb4731a5b31643fbe2e3fc7ceff3e82 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 4 Apr 2009 22:38:36 +0000 Subject: [PATCH] more haddock cleanups --- Ledger/Account.hs | 6 ++++-- Ledger/IO.hs | 27 ++++++++++++++++++++------- Ledger/Ledger.hs | 5 ++++- hledger.hs | 5 ++--- 4 files changed, 30 insertions(+), 13 deletions(-) diff --git a/Ledger/Account.hs b/Ledger/Account.hs index 8451150cc..7fc70b460 100644 --- a/Ledger/Account.hs +++ b/Ledger/Account.hs @@ -3,9 +3,11 @@ A compound data type for efficiency. An 'Account' stores - an 'AccountName', -- all `Transaction`s (postings plus ledger transaction info) in the + +- all 'Transaction's (postings plus ledger transaction info) in the account, excluding subaccounts -- and the account balance, including subaccounts. + +- a 'MixedAmount' representing the account balance, including subaccounts. -} diff --git a/Ledger/IO.hs b/Ledger/IO.hs index 72da1029a..1ce0b37c6 100644 --- a/Ledger/IO.hs +++ b/Ledger/IO.hs @@ -24,13 +24,26 @@ timelogdefaultpath = "~/.timelog" ledgerenvvar = "LEDGER" timelogenvvar = "TIMELOG" --- | A set of arguments specifying how to filter a ledger file. -type IOArgs = (DateSpan -- only in this date span - ,Maybe Bool -- only cleared/uncleared/don't care - ,Bool -- only real/don't care - ,Bool -- convert amounts to cost basis - ,[String] -- account patterns - ,[String] -- description patterns +-- | A tuple of arguments specifying how to filter a raw ledger file: +-- +-- - only include transactions in this date span +-- +-- - only include if cleared/uncleared/don't care +-- +-- - only include if real/don't care +-- +-- - convert all amounts to cost basis +-- +-- - only include if matching these account patterns +-- +-- - only include if matching these description patterns + +type IOArgs = (DateSpan + ,Maybe Bool + ,Bool + ,Bool + ,[String] + ,[String] ) noioargs = (DateSpan Nothing Nothing, Nothing, False, False, [], []) diff --git a/Ledger/Ledger.hs b/Ledger/Ledger.hs index 1ec96dcd7..df4795533 100644 --- a/Ledger/Ledger.hs +++ b/Ledger/Ledger.hs @@ -5,8 +5,11 @@ from a 'RawLedger' so that it is easy to query. It typically has had uninteresting 'LedgerTransaction's and 'Posting's removed. It contains - the original 'RawLedger' -- a tree of account names + +- a tree of 'AccountName's + - a map from account names to 'Account's + - the full text of the journal file, when available -} diff --git a/hledger.hs b/hledger.hs index 5a45a9ad5..5c0eb1c40 100644 --- a/hledger.hs +++ b/hledger.hs @@ -9,7 +9,7 @@ Released under GPL version 3 or later. hledger is a partial haskell clone of John Wiegley's "ledger" text-based accounting tool. It generates ledger-compatible register & balance reports from a plain text journal, and demonstrates a functional -implementation of ledger. For more information, see ledger.org . +implementation of ledger. For more information, see http:\/\/hledger.org . You can use the command line: @@ -19,8 +19,6 @@ or ghci: > $ ghci hledger > > l <- readLedger "sample.ledger" -> > length $ ledgerTransactions l -> 11 > > register [] ["income","expenses"] l > 2008/01/01 income income:salary $-1 $-1 > 2008/06/01 gift income:gifts $-1 $-2 @@ -34,6 +32,7 @@ or ghci: > > l <- myLedger > > t <- myTimelog +See "Ledger.Ledger" for more examples. -} module Main (