diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-11-03 12:04:17 +0100 |
---|---|---|
committer | Sylvain Henry <sylvain@haskus.fr> | 2020-11-16 10:59:30 +0100 |
commit | 25fa8fde84701c010fa466c2648f8f6d10265e8f (patch) | |
tree | 83affa7fc760b5d78f2f347f918ff74b17770b4c /haddock-api | |
parent | 4d0498d503bd51b7d7626497580232685a2691a1 (diff) |
Fix after Plugins moved into HscEnv
Diffstat (limited to 'haddock-api')
-rw-r--r-- | haddock-api/src/Haddock.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/haddock-api/src/Haddock.hs b/haddock-api/src/Haddock.hs index 662226a8..cb444844 100644 --- a/haddock-api/src/Haddock.hs +++ b/haddock-api/src/Haddock.hs @@ -67,6 +67,7 @@ import Text.ParserCombinators.ReadP (readP_to_S) import GHC hiding (verbosity) import GHC.Settings.Config import GHC.Driver.Session hiding (projectVersion, verbosity) +import GHC.Driver.Env import GHC.Utils.Error import GHC.Unit import GHC.Utils.Panic (handleGhcException) @@ -471,10 +472,10 @@ withGhc' libDir needHieFiles flags ghcActs = runGhc (Just libDir) $ do -- that may need to be re-linked: Haddock doesn't do any -- dynamic or static linking at all! _ <- setSessionDynFlags dynflags'' - hscenv <- GHC.getSession - dynflags''' <- liftIO (GHC.Runtime.Loader.initializePlugins hscenv dynflags'') - _ <- setSessionDynFlags dynflags''' - ghcActs dynflags''' + hsc_env <- GHC.getSession + hsc_env'' <- liftIO (GHC.Runtime.Loader.initializePlugins hsc_env) + _ <- GHC.setSession hsc_env'' + ghcActs (hsc_dflags hsc_env'') where -- ignore sublists of flags that start with "+RTS" and end in "-RTS" |