diff --git a/Tests.hs b/Tests.hs index 6a51f2eb8..d814c3d05 100644 --- a/Tests.hs +++ b/Tests.hs @@ -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 diff --git a/tools/bench.hs b/tools/bench.hs index 3739516f1..9283ba4d7 100644 --- a/tools/bench.hs +++ b/tools/bench.hs @@ -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:"