From 7d1fce42fed78a1e6968138debddfc3595a365c7 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 6 Dec 2012 03:56:12 +0000 Subject: [PATCH] refactor: dead code --- hledger-lib/Hledger/Data/Transaction.hs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/hledger-lib/Hledger/Data/Transaction.hs b/hledger-lib/Hledger/Data/Transaction.hs index d43b47be3..3be7604bf 100644 --- a/hledger-lib/Hledger/Data/Transaction.hs +++ b/hledger-lib/Hledger/Data/Transaction.hs @@ -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}