Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Commit e6aa8fb

Browse files
mpickeringAlex Biehl
authored andcommitted
Load plugins when starting a GHC session (#905)
Fixes #900
1 parent 9765c10 commit e6aa8fb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

haddock-api/src/Haddock.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ import Packages
7575
import Panic (handleGhcException)
7676
import Module
7777
import FastString
78+
import qualified DynamicLoading
7879

7980
--------------------------------------------------------------------------------
8081
-- * Exception handling
@@ -437,7 +438,10 @@ withGhc' libDir flags ghcActs = runGhc (Just libDir) $ do
437438
-- that may need to be re-linked: Haddock doesn't do any
438439
-- dynamic or static linking at all!
439440
_ <- setSessionDynFlags dynflags''
440-
ghcActs dynflags''
441+
hscenv <- GHC.getSession
442+
dynflags''' <- liftIO (DynamicLoading.initializePlugins hscenv dynflags'')
443+
_ <- setSessionDynFlags dynflags'''
444+
ghcActs dynflags'''
441445
where
442446

443447
-- ignore sublists of flags that start with "+RTS" and end in "-RTS"

0 commit comments

Comments
 (0)