+ -- Display details of the configuration in verbose mode
+ when (verb >= 2) $
+ do hPutStr stderr "Glasgow Haskell Compiler, Version "
+ hPutStr stderr cProjectVersion
+ hPutStr stderr ", for Haskell 98, stage "
+ hPutStr stderr cStage
+ hPutStr stderr " booted by GHC version "
+ hPutStrLn stderr cBooterVersion
+
+-- We print out a Read-friendly string, but a prettier one than the
+-- Show instance gives us
+showInfo :: IO ()
+showInfo = do
+ let sq x = " [" ++ x ++ "\n ]"
+ putStrLn $ sq $ concat $ intersperse "\n ," $ map show compilerInfo
+ exitWith ExitSuccess
+
+showSupportedLanguages :: IO ()
+showSupportedLanguages = do mapM_ putStrLn supportedLanguages
+ exitWith ExitSuccess
+
+showDocDir :: FilePath -> IO ()
+showDocDir topdir = putStrLn docDir
+ where docDir = if cRelocatableBuild
+ then topdir ++ "/doc"
+ else cDocDir
+