From 25fa8fde84701c010fa466c2648f8f6d10265e8f Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Tue, 3 Nov 2020 12:04:17 +0100 Subject: Fix after Plugins moved into HscEnv --- haddock-api/src/Haddock.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'haddock-api') 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" -- cgit v1.2.3