diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-05-12 11:49:21 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-06-13 02:13:02 -0400 |
commit | 9c5572cd29924dcc6effd8e102c9bb30d7b39bec (patch) | |
tree | abbd7659d1da84b8a7f1d612a0b11c10f4213077 | |
parent | e7272d53e67e72580caceae40e766c4bfeb1c398 (diff) | |
download | haskell-9c5572cd29924dcc6effd8e102c9bb30d7b39bec.tar.gz |
Remove LinkerUnitId type alias
-rw-r--r-- | compiler/GHC/Runtime/Linker.hs | 8 | ||||
-rw-r--r-- | compiler/GHC/Runtime/Linker/Types.hs | 6 |
2 files changed, 5 insertions, 9 deletions
diff --git a/compiler/GHC/Runtime/Linker.hs b/compiler/GHC/Runtime/Linker.hs index e45fce9bcc..7c8612ecb1 100644 --- a/compiler/GHC/Runtime/Linker.hs +++ b/compiler/GHC/Runtime/Linker.hs @@ -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 diff --git a/compiler/GHC/Runtime/Linker/Types.hs b/compiler/GHC/Runtime/Linker/Types.hs index 6e9dd5c8e9..d4539712e2 100644 --- a/compiler/GHC/Runtime/Linker/Types.hs +++ b/compiler/GHC/Runtime/Linker/Types.hs @@ -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 |