From 5d156a914ad37f6dc0f412acd527ee069b1151fa Mon Sep 17 00:00:00 2001 From: panne Date: Tue, 26 Aug 2003 19:20:55 +0000 Subject: [haddock @ 2003-08-26 19:20:55 by panne] Make it *very* clear that we terminate when given a -V/--version flag --- src/Main.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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) -- cgit v1.2.3