diff options
author | David Waern <davve@dtek.chalmers.se> | 2007-10-20 14:24:23 +0000 |
---|---|---|
committer | David Waern <davve@dtek.chalmers.se> | 2007-10-20 14:24:23 +0000 |
commit | 122bb92ffc28553b75e731639d81ce33e1cf2a28 (patch) | |
tree | 6375f06a318109c327d70045ceab967e2190b092 /src/Main.hs | |
parent | 609227fd61e9c0cca2a252ccd250544403357c97 (diff) |
Add --ghc-version option
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Main.hs b/src/Main.hs index 77bcbdbb..18001c85 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -249,8 +249,9 @@ dumpInterfaceFile modules homeLinks flags = handleEasyFlags flags fileArgs = do usage <- getUsage - when (Flag_Help `elem` flags) (bye usage) - when (Flag_Version `elem` flags) byeVersion + when (Flag_Help `elem` flags) (bye usage) + when (Flag_Version `elem` flags) byeVersion + when (Flag_GhcVersion `elem` flags) byeGhcVersion when (null fileArgs) (bye usage) let ghcLibDir = case [ dir | Flag_GhcLibDir dir <- flags ] of @@ -267,6 +268,9 @@ handleEasyFlags flags fileArgs = do "Haddock version " ++ projectVersion ++ ", (c) Simon Marlow 2003; ported to the GHC-API by David Waern 2006\n" + byeGhcVersion = bye $ + (fromJust $ lookup "Project version" $ compilerInfo) ++ "\n" + updateHTMLXRefs :: [(InterfaceFile, FilePath)] -> IO () updateHTMLXRefs packages = do |