projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cf50eb8
)
Beautify a bit
author
Ian Lynagh
<igloo@earth.li>
Tue, 12 Dec 2006 15:48:01 +0000
(15:48 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Tue, 12 Dec 2006 15:48:01 +0000
(15:48 +0000)
utils/nofib-analyse/Main.hs
patch
|
blob
|
history
diff --git
a/utils/nofib-analyse/Main.hs
b/utils/nofib-analyse/Main.hs
index
af2c928
..
7a1991e
100644
(file)
--- a/
utils/nofib-analyse/Main.hs
+++ b/
utils/nofib-analyse/Main.hs
@@
-19,6
+19,7
@@
import System.Console.GetOpt
import System.Exit ( exitWith, ExitCode(..) )
import Numeric ( showFloat, showFFloat, showSigned )
import System.Exit ( exitWith, ExitCode(..) )
import Numeric ( showFloat, showFFloat, showSigned )
+import Control.Monad
import Data.Maybe ( isNothing )
import Data.Char
import System.IO
import Data.Maybe ( isNothing )
import Data.Char
import System.IO
@@
-36,22
+37,16
@@
usageHeader = "usage: nofib-analyse [OPTION...] <logfile1> <logfile2> ..."
main = do
main = do
- if not (null cmdline_errors) || OptHelp `elem` flags
- then die (concat cmdline_errors ++ usageInfo usageHeader argInfo)
- else do
+ when (not (null cmdline_errors) || OptHelp `elem` flags) $
+ die (concat cmdline_errors ++ usageInfo usageHeader argInfo)
let { html = OptHTMLOutput `elem` flags;
latex = OptLaTeXOutput `elem` flags;
ascii = OptASCIIOutput `elem` flags
}
let { html = OptHTMLOutput `elem` flags;
latex = OptLaTeXOutput `elem` flags;
ascii = OptASCIIOutput `elem` flags
}
- if ascii && html
- then die "Can't produce both ASCII and HTML"
- else do
-
- if devs && nodevs
- then die "Can't both display and hide deviations"
- else do
+ when (ascii && html) $ die "Can't produce both ASCII and HTML"
+ when (devs && nodevs) $ die "Can't both display and hide deviations"
results <- parse_logs other_args
results <- parse_logs other_args