[project @ 2003-07-22 14:51:50 by simonmar]
[ghc-hetmet.git] / glafp-utils / nofib-analyse / CmdLine.hs
index 4dfc9f9..c16d786 100644 (file)
@@ -22,10 +22,21 @@ tooquick_threshold
        [] -> default_tooquick_threshold
        (i:_) -> i
 
+devs   = OptDeviations   `elem` flags
+nodevs = OptNoDeviations `elem` flags
+
+default_title = "NoFib Results"
+reportTitle = case [ t | OptTitle t <- flags ] of
+        []    -> default_title
+        (t:_) -> t
+
 data CLIFlags
   = OptASCIIOutput
   | OptHTMLOutput
   | OptIgnoreSmallTimes Float
+  | OptDeviations
+  | OptNoDeviations
+  | OptTitle String
   | OptHelp
   deriving Eq
 
@@ -39,5 +50,11 @@ argInfo =
        "Produce HTML output"
   , Option ['i'] ["ignore"]  (ReqArg (OptIgnoreSmallTimes . read) "secs")
        "Ignore runtimes smaller than <secs>"
+  , Option ['d'] ["deviations"] (NoArg OptDeviations)
+       "Display deviations (default)"
+  , Option ['n'] ["nodeviations"] (NoArg OptNoDeviations)
+       "Hide deviations"
+  , Option ['t'] ["title"] (ReqArg OptTitle "title")
+       "Specify report title"
   ]