diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-11-18 15:47:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 15:47:40 -0500 |
commit | 2d06af2fc535dacc4bac45d45e8eb95a7620caac (patch) | |
tree | 83affa7fc760b5d78f2f347f918ff74b17770b4c | |
parent | 4d0498d503bd51b7d7626497580232685a2691a1 (diff) | |
parent | 25fa8fde84701c010fa466c2648f8f6d10265e8f (diff) |
Merge pull request #1253 from hsyl20/wip/hsyl20/plugins/hscenv
Fix after Plugins moved into HscEnv
-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" |