From 96aa730951c44a39bd0458ba7b1d49cddbfaea16 Mon Sep 17 00:00:00 2001 From: "marko.kocic" Date: Tue, 22 Sep 2009 10:46:03 +0000 Subject: [PATCH] Hlint: Error: Monad law, left identity --- Utils.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utils.hs b/Utils.hs index 900127ef7..4e9f2fa54 100644 --- a/Utils.hs +++ b/Utils.hs @@ -34,8 +34,8 @@ withLedgerDo opts args cmdname cmd = do tc <- getClockTime let go = cmd opts args . filterAndCacheLedgerWithOpts opts args t rawtext . (\rl -> rl{filepath=f,filereadtime=tc}) case creating of - True -> return rawLedgerEmpty >>= go - False -> return f >>= runErrorT . parseLedgerFile t >>= either (hPutStrLn stderr) go + True -> go rawLedgerEmpty + False -> (runErrorT . parseLedgerFile t) f >>= either (hPutStrLn stderr) go -- | Get a Ledger from the given string and options, or raise an error. ledgerFromStringWithOpts :: [Opt] -> [String] -> LocalTime -> String -> IO Ledger