Hlint: Error: Monad law, left identity
This commit is contained in:
parent
c06580ff2a
commit
96aa730951
4
Utils.hs
4
Utils.hs
@ -34,8 +34,8 @@ withLedgerDo opts args cmdname cmd = do
|
|||||||
tc <- getClockTime
|
tc <- getClockTime
|
||||||
let go = cmd opts args . filterAndCacheLedgerWithOpts opts args t rawtext . (\rl -> rl{filepath=f,filereadtime=tc})
|
let go = cmd opts args . filterAndCacheLedgerWithOpts opts args t rawtext . (\rl -> rl{filepath=f,filereadtime=tc})
|
||||||
case creating of
|
case creating of
|
||||||
True -> return rawLedgerEmpty >>= go
|
True -> go rawLedgerEmpty
|
||||||
False -> return f >>= runErrorT . parseLedgerFile t >>= either (hPutStrLn stderr) go
|
False -> (runErrorT . parseLedgerFile t) f >>= either (hPutStrLn stderr) go
|
||||||
|
|
||||||
-- | Get a Ledger from the given string and options, or raise an error.
|
-- | Get a Ledger from the given string and options, or raise an error.
|
||||||
ledgerFromStringWithOpts :: [Opt] -> [String] -> LocalTime -> String -> IO Ledger
|
ledgerFromStringWithOpts :: [Opt] -> [String] -> LocalTime -> String -> IO Ledger
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user