aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpanne <unknown>2003-08-26 19:20:55 +0000
committerpanne <unknown>2003-08-26 19:20:55 +0000
commit5d156a914ad37f6dc0f412acd527ee069b1151fa (patch)
tree251b27c8d031fa517be9d665b31959820f94e277 /src
parent32e889cbe0d011daad4cd22f2be67acc768d2827 (diff)
[haddock @ 2003-08-26 19:20:55 by panne]
Make it *very* clear that we terminate when given a -V/--version flag
Diffstat (limited to 'src')
-rw-r--r--src/Main.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 9954cadd..ff85a038 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -126,6 +126,10 @@ run flags files = do
putStrLn (usageInfo (usageHeader prog) options)
exitWith ExitSuccess
+ when (Flag_Version `elem` flags) $ do
+ putStrLn ("Haddock version " ++ projectVersion ++ ", (c) Simon Marlow 2002")
+ exitWith ExitSuccess
+
let title = case [str | Flag_Heading str <- flags] of
[] -> ""
(t:_) -> t
@@ -134,9 +138,6 @@ run flags files = do
[] -> Nothing
(t:_) -> Just t
- when (Flag_Version `elem` flags) $
- putStrLn ("Haddock version " ++ projectVersion ++ ", (c) Simon Marlow 2002")
-
libdir <- case [str | Flag_Lib str <- flags] of
[] -> dieMsg "no --lib option"
fs -> return (last fs)