From c5ae8e68917e63b968e955162b4664253f7268db Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 16 Jan 2019 13:58:04 -0800 Subject: [PATCH] comments --- hledger-lib/Hledger/Read/Common.hs | 2 ++ hledger-ui/Hledger/UI/Main.hs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hledger-lib/Hledger/Read/Common.hs b/hledger-lib/Hledger/Read/Common.hs index a42ef8de5..164bbcb77 100644 --- a/hledger-lib/Hledger/Read/Common.hs +++ b/hledger-lib/Hledger/Read/Common.hs @@ -291,6 +291,8 @@ parseAndFinaliseJournal parser iopts f txt = do Right j -> return j Left e -> throwError e +-- Like parseAndFinaliseJournal but takes a (non-Erroring) JournalParser. +-- Used for timeclock/timedot. XXX let them use parseAndFinaliseJournal instead parseAndFinaliseJournal' :: JournalParser IO ParsedJournal -> InputOpts -> FilePath -> Text -> ExceptT String IO Journal parseAndFinaliseJournal' parser iopts f txt = do diff --git a/hledger-ui/Hledger/UI/Main.hs b/hledger-ui/Hledger/UI/Main.hs index ab392d092..74d97c3d4 100644 --- a/hledger-ui/Hledger/UI/Main.hs +++ b/hledger-ui/Hledger/UI/Main.hs @@ -71,7 +71,7 @@ main = do | otherwise = withJournalDoUICommand opts runBrickUi -- TODO fix nasty duplication of withJournalDo --- | hledger-ui's version of withJournalDo. Enables --auto and --forecast. +-- | hledger-ui's version of withJournalDo, which turns on --auto and --forecast. withJournalDoUICommand :: UIOpts -> (UIOpts -> Journal -> IO ()) -> IO () withJournalDoUICommand uopts@UIOpts{cliopts_=copts@CliOpts{inputopts_=iopts,reportopts_=ropts}} cmd = do let copts' = copts{inputopts_=iopts{auto_=True}, reportopts_=ropts{forecast_=True}}