From 572f5a4b311a55bd35ee0e9d27cfd50246670aca Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 31 Jul 2018 08:54:30 +0100 Subject: [PATCH] lib: drop parseAndFinaliseJournal', seems unused (api change) --- hledger-lib/Hledger/Read/Common.hs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/hledger-lib/Hledger/Read/Common.hs b/hledger-lib/Hledger/Read/Common.hs index 8795644a5..739356bd5 100644 --- a/hledger-lib/Hledger/Read/Common.hs +++ b/hledger-lib/Hledger/Read/Common.hs @@ -33,7 +33,6 @@ module Hledger.Read.Common ( journalSourcePos, generateAutomaticPostings, parseAndFinaliseJournal, - parseAndFinaliseJournal', -- TODO unused ? check addons setYear, getYear, setDefaultCommodityAndStyle, @@ -229,20 +228,6 @@ parseAndFinaliseJournal parser iopts f txt = do Left e -> throwError e Left e -> throwError $ customParseErrorPretty txt e -parseAndFinaliseJournal' :: JournalParser Identity ParsedJournal -> InputOpts - -> FilePath -> Text -> ExceptT String IO Journal -parseAndFinaliseJournal' parser iopts f txt = do - t <- liftIO getClockTime - y <- liftIO getCurrentYear - let ep = runParser (evalStateT parser nulljournal {jparsedefaultyear=Just y}) f txt - case ep of - Right pj -> - let pj' = if auto_ iopts then generateAutomaticPostings pj else pj in - case journalFinalise t f txt (not $ ignore_assertions_ iopts) pj' of - Right j -> return j - Left e -> throwError e - Left e -> throwError $ parseErrorPretty e - setYear :: Year -> JournalParser m () setYear y = modify' (\j -> j{jparsedefaultyear=Just y})