aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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)