diff options
author | Ian Lynagh <igloo@earth.li> | 2006-12-12 16:10:26 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2006-12-12 16:10:26 +0000 |
commit | 2b80dae352da3a5a65a05d213b19adeb6baddf48 (patch) | |
tree | 8077ceb34312657b9f4c4670eb27c61f483f6922 /utils | |
parent | 204a4f5d982669a00c2c2a7e1c32ce79fece9a66 (diff) | |
download | haskell-2b80dae352da3a5a65a05d213b19adeb6baddf48.tar.gz |
Fix more warnings
Diffstat (limited to 'utils')
-rw-r--r-- | utils/nofib-analyse/CmdLine.hs | 14 | ||||
-rw-r--r-- | utils/nofib-analyse/Main.hs | 6 |
2 files changed, 14 insertions, 6 deletions
diff --git a/utils/nofib-analyse/CmdLine.hs b/utils/nofib-analyse/CmdLine.hs index 6e920f8c60..5be7d324b0 100644 --- a/utils/nofib-analyse/CmdLine.hs +++ b/utils/nofib-analyse/CmdLine.hs @@ -4,7 +4,13 @@ -- (c) Simon Marlow 2005 ----------------------------------------------------------------------------- -module CmdLine where +module CmdLine + ( + flags, other_args, cmdline_errors, + devs, nodevs, tooquick_threshold, reportTitle, + CLIFlags(..), usage, + ) + where import System.Console.GetOpt import System.Environment ( getArgs ) @@ -43,6 +49,12 @@ data CLIFlags | OptHelp deriving Eq +usageHeader :: String +usageHeader = "usage: nofib-analyse [OPTION...] <logfile1> <logfile2> ..." + +usage :: String +usage = usageInfo usageHeader argInfo + argInfo :: [ OptDescr CLIFlags ] argInfo = [ Option ['?'] ["help"] (NoArg OptHelp) diff --git a/utils/nofib-analyse/Main.hs b/utils/nofib-analyse/Main.hs index 3405adde46..accb325860 100644 --- a/utils/nofib-analyse/Main.hs +++ b/utils/nofib-analyse/Main.hs @@ -15,7 +15,6 @@ import Text.Html hiding (cols, rows, (!)) import qualified Text.Html as Html ((!)) import qualified Data.Map as Map import Data.Map (Map) -import System.Console.GetOpt import System.Exit ( exitWith, ExitCode(..) ) import Control.Monad @@ -32,14 +31,11 @@ import Data.List die :: String -> IO a die s = hPutStr stderr s >> exitWith (ExitFailure 1) -usageHeader :: String -usageHeader = "usage: nofib-analyse [OPTION...] <logfile1> <logfile2> ..." - main :: IO () main = do when (not (null cmdline_errors) || OptHelp `elem` flags) $ - die (concat cmdline_errors ++ usageInfo usageHeader argInfo) + die (concat cmdline_errors ++ usage) let { html = OptHTMLOutput `elem` flags; latex = OptLaTeXOutput `elem` flags; |