Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
2b80dae3
Commit
2b80dae3
authored
Dec 12, 2006
by
Ian Lynagh
Browse files
Fix more warnings
parent
204a4f5d
Changes
2
Hide whitespace changes
Inline
Side-by-side
utils/nofib-analyse/CmdLine.hs
View file @
2b80dae3
...
...
@@ -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
)
...
...
utils/nofib-analyse/Main.hs
View file @
2b80dae3
...
...
@@ -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
++
usage
Info
usageHeader
argInfo
)
die
(
concat
cmdline_errors
++
usage
)
let
{
html
=
OptHTMLOutput
`
elem
`
flags
;
latex
=
OptLaTeXOutput
`
elem
`
flags
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment