Skip to content

Commit 1a5d64d

Browse files
committed
Fix runtime APIs
1 parent 4d1bc3b commit 1a5d64d

File tree

1 file changed

+18
-3
lines changed
  • ghcide/src/Development/IDE/GHC/Compat

1 file changed

+18
-3
lines changed

ghcide/src/Development/IDE/GHC/Compat/Core.hs

+18-3
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ import GHC.Runtime.Linker
504504
#endif
505505
import GHC.Rename.Names
506506
import GHC.Rename.Splice
507-
import GHC.Runtime.Interpreter
507+
import qualified GHC.Runtime.Interpreter as GHCi
508508
import GHC.Tc.Instance.Family
509509
import GHC.Tc.Module
510510
import GHC.Tc.Types
@@ -591,7 +591,7 @@ import Finder
591591
#if MIN_VERSION_ghc(8,10,0)
592592
import GHC.Hs
593593
#endif
594-
import GHCi
594+
import qualified GHCi
595595
import GhcMonad
596596
import HeaderInfo hiding (getImports)
597597
import Hooks
@@ -898,11 +898,26 @@ type PlainGhcException = Plain.PlainGhcException
898898
type PlainGhcException = Plain.GhcException
899899
#endif
900900

901-
initDynLinker :: HscEnv -> IO ()
901+
initDynLinker, initObjLinker :: HscEnv -> IO ()
902902
initDynLinker =
903903
#if !MIN_VERSION_ghc(9,0,0)
904904
Linker.initDynLinker
905905
#else
906906
-- It errors out in GHC 9.0 and doesn't exist in 9.2
907907
const $ return ()
908908
#endif
909+
910+
initObjLinker env =
911+
#if !MIN_VERSION_ghc(9,0,0)
912+
GHCi.initObjLinker env
913+
#else
914+
GHCi.initObjLinker (GHCi.hscInterp env)
915+
#endif
916+
917+
loadDLL :: HscEnv -> String -> IO (Maybe String)
918+
loadDLL env =
919+
#if !MIN_VERSION_ghc(9,0,0)
920+
GHCi.loadDLL env
921+
#else
922+
GHCi.loadDLL (GHCi.hscInterp env)
923+
#endif

0 commit comments

Comments
 (0)