Skip to content
Snippets Groups Projects
Commit e6aa8fb4 authored by Matthew Pickering's avatar Matthew Pickering Committed by Alex Biehl
Browse files

Load plugins when starting a GHC session (#905)

Fixes #900
parent 9765c10a
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,7 @@ import Packages
import Panic (handleGhcException)
import Module
import FastString
import qualified DynamicLoading
--------------------------------------------------------------------------------
-- * Exception handling
......@@ -437,7 +438,10 @@ withGhc' libDir 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''
ghcActs dynflags''
hscenv <- GHC.getSession
dynflags''' <- liftIO (DynamicLoading.initializePlugins hscenv dynflags'')
_ <- setSessionDynFlags dynflags'''
ghcActs dynflags'''
where
-- ignore sublists of flags that start with "+RTS" and end in "-RTS"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment