1
-----------------------------------------------------------------------------
4
-- (c) Simon Marlow 1999
5
-----------------------------------------------------------------------------
13
-----------------------------------------------------------------------------
14
-- Command line arguments
16
args = unsafePerformIO getArgs
17
(flags, other_args, cmdline_errors) = getOpt Permute argInfo args
19
default_tooquick_threshold = 0.2 {- secs -} :: Float
21
= case [ i | OptIgnoreSmallTimes i <- flags ] of
22
[] -> default_tooquick_threshold
25
devs = OptDeviations `elem` flags
26
nodevs = OptNoDeviations `elem` flags
28
default_title = "NoFib Results"
29
reportTitle = case [ t | OptTitle t <- flags ] of
36
| OptIgnoreSmallTimes Float
43
argInfo :: [ OptDescr CLIFlags ]
45
[ Option ['?'] ["help"] (NoArg OptHelp)
46
"Display this message"
47
, Option ['a'] ["ascii"] (NoArg OptASCIIOutput)
48
"Produce ASCII output (default)"
49
, Option ['h'] ["html"] (NoArg OptHTMLOutput)
51
, Option ['i'] ["ignore"] (ReqArg (OptIgnoreSmallTimes . read) "secs")
52
"Ignore runtimes smaller than <secs>"
53
, Option ['d'] ["deviations"] (NoArg OptDeviations)
54
"Display deviations (default)"
55
, Option ['n'] ["nodeviations"] (NoArg OptNoDeviations)
57
, Option ['t'] ["title"] (ReqArg OptTitle "title")
58
"Specify report title"