aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2009-08-15 23:52:03 +0000
committerDavid Waern <david.waern@gmail.com>2009-08-15 23:52:03 +0000
commit7f4130af50264254efa0b6c22be83b078b63d798 (patch)
tree311a098f8f37aab2a82a969a719f52129585687d /src/Main.hs
parent0c2f863e8189e6c31d0b28fa363132993e60b6d4 (diff)
Add --print-ghc-libdir
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Main.hs b/src/Main.hs
index a676d9a8..465ebfd8 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -433,9 +433,13 @@ handleEasyFlags :: [Flag] -> IO ()
handleEasyFlags flags = do
usage <- getUsage
- when (Flag_Help `elem` flags) (bye usage)
- when (Flag_Version `elem` flags) byeVersion
- when (Flag_GhcVersion `elem` flags) byeGhcVersion
+ when (Flag_Help `elem` flags) (bye usage)
+ when (Flag_Version `elem` flags) byeVersion
+ when (Flag_GhcVersion `elem` flags) byeGhcVersion
+
+ when (Flag_PrintGhcLibDir `elem` flags) $ do
+ dir <- getGhcLibDir flags
+ bye $ dir ++ "\n"
when (Flag_UseUnicode `elem` flags && not (Flag_Html `elem` flags)) $
throwE ("Unicode can only be enabled for HTML output.")