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}}