Commit 9c5572cd authored by Sylvain Henry's avatar Sylvain Henry Committed by Marge Bot

Remove LinkerUnitId type alias

parent e7272d53
......@@ -48,7 +48,7 @@ import GHC.Types.Name
import GHC.Types.Name.Env
import GHC.Unit.Module
import GHC.Data.List.SetOps
import GHC.Runtime.Linker.Types (DynLinker(..), LinkerUnitId, PersistentLinkerState(..))
import GHC.Runtime.Linker.Types (DynLinker(..), PersistentLinkerState(..))
import GHC.Driver.Session
import GHC.Types.Basic
import GHC.Utils.Outputable
......@@ -1227,7 +1227,7 @@ showLS (Framework nm) = "(framework) " ++ nm
-- automatically, and it doesn't matter what order you specify the input
-- packages.
--
linkPackages :: HscEnv -> [LinkerUnitId] -> IO ()
linkPackages :: HscEnv -> [UnitId] -> IO ()
-- NOTE: in fact, since each module tracks all the packages it depends on,
-- we don't really need to use the package-config dependencies.
--
......@@ -1244,7 +1244,7 @@ linkPackages hsc_env new_pkgs = do
modifyPLS_ dl $ \pls -> do
linkPackages' hsc_env new_pkgs pls
linkPackages' :: HscEnv -> [LinkerUnitId] -> PersistentLinkerState
linkPackages' :: HscEnv -> [UnitId] -> PersistentLinkerState
-> IO PersistentLinkerState
linkPackages' hsc_env new_pks pls = do
pkgs' <- link (pkgs_loaded pls) new_pks
......@@ -1253,7 +1253,7 @@ linkPackages' hsc_env new_pks pls = do
dflags = hsc_dflags hsc_env
pkgstate = pkgState dflags
link :: [LinkerUnitId] -> [LinkerUnitId] -> IO [LinkerUnitId]
link :: [UnitId] -> [UnitId] -> IO [UnitId]
link pkgs new_pkgs =
foldM link_one pkgs new_pkgs
......
......@@ -9,7 +9,6 @@
module GHC.Runtime.Linker.Types (
DynLinker(..),
PersistentLinkerState(..),
LinkerUnitId,
Linkable(..),
Unlinked(..),
SptEntry(..)
......@@ -55,15 +54,12 @@ data PersistentLinkerState
-- The currently-loaded packages; always object code
-- Held, as usual, in dependency order; though I am not sure if
-- that is really important
pkgs_loaded :: ![LinkerUnitId],
pkgs_loaded :: ![UnitId],
-- we need to remember the name of previous temporary DLL/.so
-- libraries so we can link them (see #10322)
temp_sos :: ![(FilePath, String)] }
-- TODO: Make this type more precise
type LinkerUnitId = UnitId
-- | Information we can use to dynamically link modules into the compiler
data Linkable = LM {
linkableTime :: UTCTime, -- ^ Time at which this linkable was built
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment