fix some breakages found by Hydra
This commit is contained in:
parent
21f359f56a
commit
d158d401d9
@ -56,7 +56,7 @@ import System.FilePath
|
||||
import Hledger.Data
|
||||
-- XXX too much reuse ?
|
||||
import Hledger.Read.JournalReader (
|
||||
directive, historicalpricedirective, defaultyeardirective, emptyline, datetime,
|
||||
directive, historicalpricedirective, defaultyeardirective, emptyline, datetimep,
|
||||
parseJournalWith, getParentAccount
|
||||
)
|
||||
import Hledger.Utils
|
||||
@ -100,7 +100,7 @@ timelogentry :: GenParser Char JournalContext TimeLogEntry
|
||||
timelogentry = do
|
||||
code <- oneOf "bhioO"
|
||||
many1 spacenonewline
|
||||
datetime <- datetime
|
||||
datetime <- datetimep
|
||||
comment <- optionMaybe (many1 spacenonewline >> liftM2 (++) getParentAccount restofline)
|
||||
return $ TimeLogEntry (read [code]) datetime (maybe "" rstrip comment)
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ getTransaction j opts defdate moredefs = do
|
||||
-- A default date, and zero or more defaults for subsequent fields, are provided.
|
||||
getTransactionOrRestart :: Journal -> CliOpts -> String -> [String] -> IO (Maybe Transaction)
|
||||
getTransactionOrRestart j opts defdate moredefs = do
|
||||
let dateandcodep = do {d <- smartdate; c <- optionMaybe code; many spacenonewline; eof; return (d, fromMaybe "" c)}
|
||||
let dateandcodep = do {d <- smartdate; c <- optionMaybe codep; many spacenonewline; eof; return (d, fromMaybe "" c)}
|
||||
datecodestr <- runInteractionDefault $ askFor "date"
|
||||
(Just defdate)
|
||||
(Just $ \s -> null s
|
||||
|
||||
Loading…
Reference in New Issue
Block a user