diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-04-28 16:19:04 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2022-04-28 16:19:04 -0400 |
commit | 2627a86cb2dd3256c93adf0df8a7d3366a303b02 (patch) | |
tree | bc87633ed85be301227f3f3c5a88f7cd96b52201 /haddock-api/src/Haddock/Interface.hs | |
parent | b29a78ef6926101338f62e84f456dac8659dc9d2 (diff) |
Revert "Bump ghc-head (#1445)"
This reverts commit b29a78ef6926101338f62e84f456dac8659dc9d2.
This should not have been merged.
Diffstat (limited to 'haddock-api/src/Haddock/Interface.hs')
-rw-r--r-- | haddock-api/src/Haddock/Interface.hs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/haddock-api/src/Haddock/Interface.hs b/haddock-api/src/Haddock/Interface.hs index e4934711..ba7d9d30 100644 --- a/haddock-api/src/Haddock/Interface.hs +++ b/haddock-api/src/Haddock/Interface.hs @@ -56,11 +56,11 @@ import qualified Data.Set as Set import GHC hiding (verbosity) import GHC.Data.FastString (unpackFS) import GHC.Data.Graph.Directed -import GHC.Driver.Env +import GHC.Driver.Env (hscUpdateFlags, hsc_home_unit, hsc_logger, hsc_static_plugins, hsc_units) import GHC.Driver.Monad (modifySession, withTimingM) import GHC.Driver.Session hiding (verbosity) import GHC.HsToCore.Docs (getMainDeclBinder) -import GHC.Plugins +import GHC.Plugins (Outputable, Plugin (..), PluginWithArgs (..), StaticPlugin (..), defaultPlugin, keepRenamedSource) import GHC.Tc.Types (TcGblEnv (..), TcM) import GHC.Tc.Utils.Env (tcLookupGlobal) import GHC.Tc.Utils.Monad (getTopEnv, setGblEnv) @@ -145,12 +145,10 @@ createIfaces verbosity modules flags instIfaceMap = do let installHaddockPlugin :: HscEnv -> HscEnv - installHaddockPlugin hsc_env = - let - old_plugins = hsc_plugins hsc_env - new_plugins = old_plugins { staticPlugins = haddockPlugin : staticPlugins old_plugins } - hsc_env' = hsc_env { hsc_plugins = new_plugins } - in hscUpdateFlags (flip gopt_set Opt_PluginTrustworthy) hsc_env' + installHaddockPlugin hsc_env = hscUpdateFlags (flip gopt_set Opt_PluginTrustworthy) $ hsc_env + { hsc_static_plugins = + haddockPlugin : hsc_static_plugins hsc_env + } -- Note that we would rather use withTempSession but as long as we -- have the separate attachInstances step we need to keep the session |