From 2b34ff1184c0f3666f2a46907c99efd332b91534 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 30 Mar 2018 02:41:03 +0100 Subject: [PATCH] lib: reportSpan debug output --- hledger-lib/Hledger/Reports/ReportOptions.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hledger-lib/Hledger/Reports/ReportOptions.hs b/hledger-lib/Hledger/Reports/ReportOptions.hs index 716b859b3..440390e82 100644 --- a/hledger-lib/Hledger/Reports/ReportOptions.hs +++ b/hledger-lib/Hledger/Reports/ReportOptions.hs @@ -418,12 +418,14 @@ tests_queryOptsFromOpts = [ -- Needs IO to parse smart dates in options/queries. reportSpan :: Journal -> ReportOpts -> IO DateSpan reportSpan j ropts = do - (mspecifiedstartdate, mspecifiedenddate) <- specifiedStartEndDates ropts + (mspecifiedstartdate, mspecifiedenddate) <- + dbg2 "specifieddates" <$> specifiedStartEndDates ropts let - DateSpan mjournalstartdate mjournalenddate = journalDateSpan False j -- don't bother with secondary dates + DateSpan mjournalstartdate mjournalenddate = + dbg2 "journalspan" $ journalDateSpan False j -- don't bother with secondary dates mstartdate = mspecifiedstartdate <|> mjournalstartdate menddate = mspecifiedenddate <|> mjournalenddate - return $ DateSpan mstartdate menddate + return $ dbg1 "reportspan" $ DateSpan mstartdate menddate reportStartDate :: Journal -> ReportOpts -> IO (Maybe Day) reportStartDate j ropts = spanStart <$> reportSpan j ropts