lib: drop parseAndFinaliseJournal', seems unused (api change)
This commit is contained in:
parent
ebfdee878c
commit
572f5a4b31
@ -33,7 +33,6 @@ module Hledger.Read.Common (
|
|||||||
journalSourcePos,
|
journalSourcePos,
|
||||||
generateAutomaticPostings,
|
generateAutomaticPostings,
|
||||||
parseAndFinaliseJournal,
|
parseAndFinaliseJournal,
|
||||||
parseAndFinaliseJournal', -- TODO unused ? check addons
|
|
||||||
setYear,
|
setYear,
|
||||||
getYear,
|
getYear,
|
||||||
setDefaultCommodityAndStyle,
|
setDefaultCommodityAndStyle,
|
||||||
@ -229,20 +228,6 @@ parseAndFinaliseJournal parser iopts f txt = do
|
|||||||
Left e -> throwError e
|
Left e -> throwError e
|
||||||
Left e -> throwError $ customParseErrorPretty txt 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 :: Year -> JournalParser m ()
|
||||||
setYear y = modify' (\j -> j{jparsedefaultyear=Just y})
|
setYear y = modify' (\j -> j{jparsedefaultyear=Just y})
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user