aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Haddock/GHC.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Haddock/GHC.hs b/src/Haddock/GHC.hs
index 6ea72a29..d5b59e0e 100644
--- a/src/Haddock/GHC.hs
+++ b/src/Haddock/GHC.hs
@@ -32,7 +32,11 @@ import StaticFlags
startGhc :: String -> [String] -> IO (Session, DynFlags)
startGhc libDir flags = do
-- TODO: handle warnings?
+#if __GLASGOW_HASKELL__ >= 609
(restFlags, _) <- parseStaticFlags flags
+#else
+ restFlags <- parseStaticFlags flags
+#endif
session <- newSession (Just libDir)
dynflags <- getSessionDynFlags session
let dynflags' = dopt_set dynflags Opt_Haddock