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
31 | OptIgnoreSmallTimes Float
37 argInfo :: [ OptDescr CLIFlags ]
39 [ Option ['?'] ["help"] (NoArg OptHelp)
40 "Display this message"
41 , Option ['a'] ["ascii"] (NoArg OptASCIIOutput)
42 "Produce ASCII output (default)"
43 , Option ['h'] ["html"] (NoArg OptHTMLOutput)
45 , Option ['i'] ["ignore"] (ReqArg (OptIgnoreSmallTimes . read) "secs")
46 "Ignore runtimes smaller than <secs>"
47 , Option ['d'] ["deviations"] (NoArg OptDeviations)
48 "Display deviations (default)"
49 , Option ['n'] ["nodeviations"] (NoArg OptNoDeviations)