refactor: dead code

This commit is contained in:
Simon Michael 2012-12-06 03:56:12 +00:00
parent 757c877ffa
commit 7d1fce42fe

View File

@ -24,7 +24,6 @@ module Hledger.Data.Transaction (
-- * date operations
transactionActualDate,
transactionEffectiveDate,
transactionWithDate,
-- * arithmetic
transactionPostingBalances,
balanceTransaction,
@ -350,17 +349,6 @@ transactionActualDate = tdate
transactionEffectiveDate :: Transaction -> Day
transactionEffectiveDate t = fromMaybe (tdate t) $ teffectivedate t
-- | Once we no longer need both, set the main transaction date to either
-- the actual or effective date. A bit hacky.
transactionWithDate :: WhichDate -> Transaction -> Transaction
transactionWithDate ActualDate t = t
transactionWithDate EffectiveDate t =
txnTieKnot t{tdate=transactionEffectiveDate t, tpostings=map (postingWithDate EffectiveDate) $ tpostings t}
postingWithDate :: WhichDate -> Posting -> Posting
postingWithDate ActualDate p = p
postingWithDate EffectiveDate p = p{pdate=pdate2 p}
-- | Ensure a transaction's postings refer back to it.
txnTieKnot :: Transaction -> Transaction
txnTieKnot t@Transaction{tpostings=ps} = t{tpostings=map (settxn t) ps}