slightly less verbose Show Ledger

This commit is contained in:
Simon Michael 2008-10-12 09:16:04 +00:00
parent 01cd388c24
commit a9f021eebe

View File

@ -25,13 +25,12 @@ ledgertests = TestList [
]
instance Show Ledger where
show l = printf "Ledger with %d entries, %d accounts: %s"
show l = printf "Ledger with %d entries, %d accounts\n%s"
((length $ entries $ rawledger l) +
(length $ modifier_entries $ rawledger l) +
(length $ periodic_entries $ rawledger l))
(length $ accountnames l)
(show $ accountnames l)
++ "\n" ++ (showtree $ accountnametree l)
(showtree $ accountnametree l)
-- | Convert a raw ledger to a more efficient cached type, described above.
cacheLedger :: RawLedger -> Ledger