Skip to content

Commit d4fbc2c

Browse files
committed
Remove unused _removeInplacePackages function
1 parent a92ffb1 commit d4fbc2c

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

ghcide/session-loader/Development/IDE/Session.hs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,24 +1324,6 @@ getDependencyInfo fs = Map.fromList <$> mapM do_one fs
13241324
do_one :: FilePath -> IO (FilePath, Maybe UTCTime)
13251325
do_one fp = (fp,) . eitherToMaybe <$> safeTryIO (getModificationTime fp)
13261326

1327-
-- | This function removes all the -package flags which refer to packages we
1328-
-- are going to deal with ourselves. For example, if a executable depends
1329-
-- on a library component, then this function will remove the library flag
1330-
-- from the package flags for the executable
1331-
--
1332-
-- There are several places in GHC (for example the call to hptInstances in
1333-
-- tcRnImports) which assume that all modules in the HPT have the same unit
1334-
-- ID. Therefore we create a fake one and give them all the same unit id.
1335-
_removeInplacePackages --Only used in ghc < 9.4
1336-
:: UnitId -- ^ fake uid to use for our internal component
1337-
-> [UnitId]
1338-
-> DynFlags
1339-
-> (DynFlags, [UnitId])
1340-
_removeInplacePackages fake_uid us df = (setHomeUnitId_ fake_uid $
1341-
df { packageFlags = ps }, uids)
1342-
where
1343-
(uids, ps) = Compat.filterInplaceUnits us (packageFlags df)
1344-
13451327
-- | Memoize an IO function, with the characteristics:
13461328
--
13471329
-- * If multiple people ask for a result simultaneously, make sure you only compute it once.

0 commit comments

Comments
 (0)