summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-09-24 15:24:36 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-09-29 09:44:40 -0400
commit770fcac8a33983698d0f16249694c76ff649701e (patch)
tree58c77cb56252945ed44476125876163799081993
parentd46e34d08e95e1bdc90210590baaad2cf3521f7c (diff)
downloadhaskell-770fcac8a33983698d0f16249694c76ff649701e.tar.gz
GHC: Drop dead packageDbModules
It was already commented out and contained a reference to the non-deterministic nameEnvElts so let's just drop it.
-rw-r--r--compiler/GHC.hs24
1 files changed, 0 insertions, 24 deletions
diff --git a/compiler/GHC.hs b/compiler/GHC.hs
index a95757b8fd..0e4f781a29 100644
--- a/compiler/GHC.hs
+++ b/compiler/GHC.hs
@@ -96,9 +96,6 @@ module GHC (
ModIface, ModIface_(..),
SafeHaskellMode(..),
- -- * Querying the environment
- -- packageDbModules,
-
-- * Printing
PrintUnqualified, alwaysQualify,
@@ -1517,27 +1514,6 @@ getNameToInstancesIndex visible_mods mods_to_load = do
] }
-- -----------------------------------------------------------------------------
-
-{- ToDo: Move the primary logic here to "GHC.Unit.State"
--- | Return all /external/ modules available in the package database.
--- Modules from the current session (i.e., from the 'HomePackageTable') are
--- not included. This includes module names which are reexported by packages.
-packageDbModules :: GhcMonad m =>
- Bool -- ^ Only consider exposed packages.
- -> m [Module]
-packageDbModules only_exposed = do
- dflags <- getSessionDynFlags
- let pkgs = eltsUFM (unitInfoMap (unitState dflags))
- return $
- [ mkModule pid modname
- | p <- pkgs
- , not only_exposed || exposed p
- , let pid = mkUnit p
- , modname <- exposedModules p
- ++ map exportName (reexportedModules p) ]
- -}
-
--- -----------------------------------------------------------------------------
-- Misc exported utils
dataConType :: DataCon -> Type