Fix more warnings
authorIan Lynagh <igloo@earth.li>
Tue, 12 Dec 2006 16:10:26 +0000 (16:10 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 12 Dec 2006 16:10:26 +0000 (16:10 +0000)
utils/nofib-analyse/CmdLine.hs
utils/nofib-analyse/Main.hs

index 6e920f8..5be7d32 100644 (file)
@@ -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)        
index 3405add..accb325 100644 (file)
@@ -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;