diff options
author | David Waern <david.waern@gmail.com> | 2008-08-12 23:11:12 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2008-08-12 23:11:12 +0000 |
commit | 8af2688ea2de3172a7ef6d91b47d2a78fd365916 (patch) | |
tree | 3851c9f435891b9d2dd049d2bae57c0ca6110819 /src | |
parent | 542b4ff142cc49240b220ed03ca392bba783b550 (diff) |
Follow changes to parseDynamic/StaticFlags
Diffstat (limited to 'src')
-rw-r--r-- | src/Haddock/GHC.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Haddock/GHC.hs b/src/Haddock/GHC.hs index 742c5f77..6ea72a29 100644 --- a/src/Haddock/GHC.hs +++ b/src/Haddock/GHC.hs @@ -31,7 +31,8 @@ import StaticFlags -- compilation and linking. startGhc :: String -> [String] -> IO (Session, DynFlags) startGhc libDir flags = do - restFlags <- parseStaticFlags flags + -- TODO: handle warnings? + (restFlags, _) <- parseStaticFlags flags session <- newSession (Just libDir) dynflags <- getSessionDynFlags session let dynflags' = dopt_set dynflags Opt_Haddock @@ -91,7 +92,12 @@ loadPackages session pkgStrs = do -- | Try to parse dynamic GHC flags parseGhcFlags dynflags flags origFlags = do + -- TODO: handle warnings? +#if __GLASGOW_HASKELL__ >= 609 + (dynflags', rest, _) <- parseDynamicFlags dynflags flags +#else (dynflags', rest) <- parseDynamicFlags dynflags flags +#endif if not (null rest) then throwE ("Couldn't parse GHC options: " ++ (unwords origFlags)) else return dynflags' |