summaryrefslogtreecommitdiff
path: root/compiler/GHC/Iface/Recomp.hs
diff options
context:
space:
mode:
authorJosh Meredith <joshmeredith2008@gmail.com>2023-04-24 18:00:18 +0000
committerJosh Meredith <joshmeredith2008@gmail.com>2023-05-04 10:39:38 +0000
commitddbb211eb3625cfbc8fe5a7f55fef1ee2cea34d8 (patch)
tree2993c44b4310fb66a5f5926dcfd10c876df5d4de /compiler/GHC/Iface/Recomp.hs
parent00a8a5ff9abf5bb1a0c2a9225c7bca5ec3bdf306 (diff)
downloadhaskell-ddbb211eb3625cfbc8fe5a7f55fef1ee2cea34d8.tar.gz
Refactor `Set UnitId` to `UniqDSet UnitId` (#23335)wip/unitidset
Diffstat (limited to 'compiler/GHC/Iface/Recomp.hs')
-rw-r--r--compiler/GHC/Iface/Recomp.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/GHC/Iface/Recomp.hs b/compiler/GHC/Iface/Recomp.hs
index b0e668f0e6..a898dbd27c 100644
--- a/compiler/GHC/Iface/Recomp.hs
+++ b/compiler/GHC/Iface/Recomp.hs
@@ -59,6 +59,7 @@ import GHC.Types.SrcLoc
import GHC.Types.Unique.Set
import GHC.Types.Fixity.Env
import GHC.Types.Unique.Map
+import GHC.Types.Unique.DSet
import GHC.Unit.External
import GHC.Unit.Finder
import GHC.Unit.State
@@ -617,8 +618,8 @@ checkDependencies hsc_env summary iface
all_home_units = hsc_all_home_unit_ids hsc_env
units = hsc_units hsc_env
prev_dep_mods = map (second gwib_mod) $ Set.toAscList $ dep_direct_mods (mi_deps iface)
- prev_dep_pkgs = Set.toAscList (Set.union (dep_direct_pkgs (mi_deps iface))
- (dep_plugin_pkgs (mi_deps iface)))
+ prev_dep_pkgs = uniqDSetToAscList (unionUniqDSets (dep_direct_pkgs (mi_deps iface))
+ (dep_plugin_pkgs (mi_deps iface)))
implicit_deps = map (fsLit "Implicit",) (implicitPackageDeps dflags)
@@ -633,7 +634,7 @@ checkDependencies hsc_env summary iface
classify _ (Found _ mod)
- | (toUnitId $ moduleUnit mod) `elem` all_home_units = Right (Left ((toUnitId $ moduleUnit mod), moduleName mod))
+ | (toUnitId $ moduleUnit mod) `elementOfUniqDSet` all_home_units = Right (Left ((toUnitId $ moduleUnit mod), moduleName mod))
| otherwise = Right (Right (moduleNameFS (moduleName mod), toUnitId $ moduleUnit mod))
classify reason _ = Left (RecompBecause reason)