summaryrefslogtreecommitdiff
path: root/ghc/GHCi
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-10-12 12:43:38 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-11-03 17:40:34 -0500
commit14ce454f7294381225b4211dc191a167a386e380 (patch)
tree00dde0d9eeaee019842352560bc42f7147e4abaa /ghc/GHCi
parent78f2767d4db5e69a142ac6a408a217b11c35949d (diff)
downloadhaskell-14ce454f7294381225b4211dc191a167a386e380.tar.gz
Linker: reorganize linker related code
Move linker related code into GHC.Linker. Previously it was scattered into GHC.Unit.State, GHC.Driver.Pipeline, GHC.Runtime.Linker, etc. Add documentation in GHC.Linker
Diffstat (limited to 'ghc/GHCi')
-rw-r--r--ghc/GHCi/Leak.hs2
-rw-r--r--ghc/GHCi/UI.hs8
2 files changed, 5 insertions, 5 deletions
diff --git a/ghc/GHCi/Leak.hs b/ghc/GHCi/Leak.hs
index 99f49fddb9..e973390e3e 100644
--- a/ghc/GHCi/Leak.hs
+++ b/ghc/GHCi/Leak.hs
@@ -17,7 +17,7 @@ import GHC.Utils.Outputable
import GHC.Unit.Module.ModDetails
import GHC.Unit.Home.ModInfo
import GHC.Platform (target32Bit)
-import GHC.Runtime.Linker.Types
+import GHC.Linker.Types
import Prelude
import System.Mem
import System.Mem.Weak
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs
index d41f46a4a2..2c2b9fc3bb 100644
--- a/ghc/GHCi/UI.hs
+++ b/ghc/GHCi/UI.hs
@@ -89,7 +89,7 @@ import GHC.Settings.Config
import GHC.Data.Graph.Directed
import GHC.Utils.Encoding
import GHC.Data.FastString
-import GHC.Runtime.Linker
+import qualified GHC.Linker.Loader as Loader
import GHC.Data.Maybe ( orElse, expectJust )
import GHC.Types.Name.Set
import GHC.Utils.Panic hiding ( showException, try )
@@ -2965,7 +2965,7 @@ newDynFlags interactive_only minus_opts = do
clearAllTargets
when must_reload $ do
let units = preloadUnits (unitState dflags2)
- liftIO $ linkPackages hsc_env units
+ liftIO $ Loader.loadPackages hsc_env units
-- package flags changed, we can't re-use any of the old context
setContextAfterLoad False []
-- and copy the package state to the interactive DynFlags
@@ -2986,7 +2986,7 @@ newDynFlags interactive_only minus_opts = do
, cmdlineFrameworks = newCLFrameworks } }
when (not (null newLdInputs && null newCLFrameworks)) $
- liftIO $ linkCmdLineLibs hsc_env'
+ liftIO $ Loader.loadCmdLineLibs hsc_env'
return ()
@@ -3088,7 +3088,7 @@ showCmd str = do
, action "modules" $ showModules
, action "bindings" $ showBindings
, action "linker" $ do
- msg <- liftIO $ showLinkerState (hsc_dynLinker hsc_env)
+ msg <- liftIO $ Loader.showLoaderState (hsc_loader hsc_env)
dflags <- getDynFlags
liftIO $ putLogMsg dflags NoReason SevDump noSrcSpan msg
, action "breaks" $ showBkptTable