got rid of almost all 'return ()'

This commit is contained in:
Joey Hess 2010-10-28 12:40:05 -04:00
parent 9c7b3dce9e
commit 045b051ec1
9 changed files with 30 additions and 50 deletions

View file

@ -8,6 +8,7 @@
import IO (try)
import System.IO
import System.Environment
import Monad
import qualified Annex
import Types
@ -42,12 +43,8 @@ tryRun' state errnum (a:as) = do
tryRun' state (errnum + 1) as
Right (True,state') -> tryRun' state' errnum as
Right (False,state') -> tryRun' state' (errnum + 1) as
tryRun' state errnum [] = do
if (errnum > 0)
then error $ (show errnum) ++ " failed"
else return ()
tryRun' state errnum [] =
when (errnum > 0) $ error $ (show errnum) ++ " failed"
{- Exception pretty-printing. -}
showErr e = do
hPutStrLn stderr $ "git-annex: " ++ (show e)
return ()
showErr e = hPutStrLn stderr $ "git-annex: " ++ (show e)