1
-----------------------------------------------------------------------------
3
-----------------------------------------------------------------------------
11
-----------------------------------------------------------------------------
13
args = unsafePerformIO getArgs
14
(flags, other_args, cmdline_errors) = getOpt Permute argInfo args
16
default_tooquick_threshold = 0.2 {- secs -} :: Float
18
= case [ i | OptIgnoreSmallTimes i <- flags ] of
19
[] -> default_tooquick_threshold
22
devs = OptDeviations `elem` flags
23
nodevs = OptNoDeviations `elem` flags
25
default_title = "NoFib Results"
26
reportTitle = case [ t | OptTitle t <- flags ] of
34
| OptIgnoreSmallTimes Float
41
argInfo :: [ OptDescr CLIFlags ]
43
[ Option ['?'] ["help"] (NoArg OptHelp)
44
"Display this message"
45
, Option ['a'] ["ascii"] (NoArg OptASCIIOutput)
46
"Produce ASCII output (default)"
47
, Option ['h'] ["html"] (NoArg OptHTMLOutput)
49
, Option ['i'] ["ignore"] (ReqArg (OptIgnoreSmallTimes . read) "secs")
50
"Ignore runtimes smaller than <secs>"
51
, Option ['d'] ["deviations"] (NoArg OptDeviations)
52
"Display deviations (default)"
53
, Option ['l'] ["latex"] (NoArg OptLaTeXOutput)
54
"Produce LaTeX output"
55
, Option ['n'] ["nodeviations"] (NoArg OptNoDeviations)
57
, Option ['t'] ["title"] (ReqArg OptTitle "title")
58
"Specify report title"