Hlint: Warning: Use liftM

This commit is contained in:
marko.kocic 2009-09-23 09:35:50 +00:00
parent d6393f5f63
commit 8414f06416
2 changed files with 2 additions and 2 deletions

View File

@ -218,7 +218,7 @@ runtests opts args = do
else exitWith ExitSuccess
where
runner | Verbose `elem` opts = runVerboseTests
| otherwise = \t -> runTestTT t >>= return . flip (,) 0
| otherwise = liftM (flip (,) 0) . runTestTT
ts = TestList $ filter matchname $ concatMap tflatten tests
--ts = tfilter matchname $ TestList tests -- unflattened
matchname = matchpats args . tname

View File

@ -123,7 +123,7 @@ main = do
let (opts,exes) = parseargs args
when (null exes) $ error $ "at least one executable needed\n" ++ usage
let (file, num) = (fileopt opts, numopt opts)
tests <- readFile file >>= return . filter istest . lines
tests <- liftM (filter istest . lines) (readFile file)
now <- getCurrentTime
putStrLn $ printf "Using %s" file
putStrLn $ printf "Running %d tests %d times with %d executables at %s:"