diff options
author | David Waern <david.waern@gmail.com> | 2009-08-15 23:52:03 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2009-08-15 23:52:03 +0000 |
commit | 7f4130af50264254efa0b6c22be83b078b63d798 (patch) | |
tree | 311a098f8f37aab2a82a969a719f52129585687d /src/Main.hs | |
parent | 0c2f863e8189e6c31d0b28fa363132993e60b6d4 (diff) |
Add --print-ghc-libdir
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 10 |
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.") |