@@ -500,11 +500,11 @@ import GHC.Platform.Ways
500
500
import GHC.Runtime.Context (InteractiveImport (.. ))
501
501
#else
502
502
import GHC.Parser.Lexer
503
- import GHC.Runtime. Linker
503
+ import qualified GHC.Runtime.Linker as Linker
504
504
#endif
505
505
import GHC.Rename.Names
506
506
import GHC.Rename.Splice
507
- import GHC.Runtime.Interpreter
507
+ import qualified GHC.Runtime.Interpreter as GHCi
508
508
import GHC.Tc.Instance.Family
509
509
import GHC.Tc.Module
510
510
import GHC.Tc.Types
@@ -591,7 +591,7 @@ import Finder
591
591
#if MIN_VERSION_ghc(8,10,0)
592
592
import GHC.Hs
593
593
#endif
594
- import GHCi
594
+ import qualified GHCi
595
595
import GhcMonad
596
596
import HeaderInfo hiding (getImports )
597
597
import Hooks
@@ -898,11 +898,26 @@ type PlainGhcException = Plain.PlainGhcException
898
898
type PlainGhcException = Plain. GhcException
899
899
#endif
900
900
901
- initDynLinker :: HscEnv -> IO ()
901
+ initDynLinker , initObjLinker :: HscEnv -> IO ()
902
902
initDynLinker =
903
903
#if !MIN_VERSION_ghc(9,0,0)
904
904
Linker. initDynLinker
905
905
#else
906
906
-- It errors out in GHC 9.0 and doesn't exist in 9.2
907
907
const $ return ()
908
908
#endif
909
+
910
+ initObjLinker env =
911
+ #if !MIN_VERSION_ghc(9,2,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,2,0)
920
+ GHCi. loadDLL env
921
+ #else
922
+ GHCi. loadDLL (GHCi. hscInterp env)
923
+ #endif
0 commit comments