summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-02-17 15:56:21 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2022-02-21 15:38:05 +0000
commitdf029242c53e9b58386a866bd522db1bff5bfb97 (patch)
tree93e7a11995776136e694c86550b0169a8137a1c9
parent06fd79ca77fc3902280af8f92acdc63027b42802 (diff)
downloadhaskell-df029242c53e9b58386a866bd522db1bff5bfb97.tar.gz
Remove mg_boot field from ModuleGraph
It was unused in the compiler so I have removed it to streamline ModuleGraph.
-rw-r--r--compiler/GHC/Unit/Module/Graph.hs12
1 files changed, 1 insertions, 11 deletions
diff --git a/compiler/GHC/Unit/Module/Graph.hs b/compiler/GHC/Unit/Module/Graph.hs
index a225c50f27..913c51ef10 100644
--- a/compiler/GHC/Unit/Module/Graph.hs
+++ b/compiler/GHC/Unit/Module/Graph.hs
@@ -16,9 +16,7 @@ module GHC.Unit.Module.Graph
, mapMG
, mgModSummaries
, mgModSummaries'
- , mgElemModule
, mgLookupModule
- , mgBootModules
, mgTransDeps
, needsTemplateHaskellOrQQ
, isTemplateHaskellOrQQNonBoot
@@ -137,8 +135,6 @@ data ModuleGraph = ModuleGraph
-- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances)
, mg_non_boot :: ModuleEnv ModSummary
-- a map of all non-boot ModSummaries keyed by Modules
- , mg_boot :: ModuleSet
- -- a set of boot Modules
, mg_needs_th_or_qq :: !Bool
-- does any of the modules in mg_mss require TemplateHaskell or
-- QuasiQuotes?
@@ -164,9 +160,6 @@ mapMG f mg@ModuleGraph{..} = mg
, mg_non_boot = mapModuleEnv f mg_non_boot
}
-mgBootModules :: ModuleGraph -> ModuleSet
-mgBootModules ModuleGraph{..} = mg_boot
-
mgTransDeps :: ModuleGraph -> Map.Map NodeKey (Set.Set NodeKey)
mgTransDeps = mg_trans_deps
@@ -184,7 +177,7 @@ mgLookupModule :: ModuleGraph -> Module -> Maybe ModSummary
mgLookupModule ModuleGraph{..} m = lookupModuleEnv mg_non_boot m
emptyMG :: ModuleGraph
-emptyMG = ModuleGraph [] Map.empty emptyModuleEnv emptyModuleSet False
+emptyMG = ModuleGraph [] Map.empty emptyModuleEnv False
isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool
isTemplateHaskellOrQQNonBoot ms =
@@ -201,9 +194,6 @@ extendMG ModuleGraph{..} deps ms = ModuleGraph
, mg_non_boot = case isBootSummary ms of
IsBoot -> mg_non_boot
NotBoot -> extendModuleEnv mg_non_boot (ms_mod ms) ms
- , mg_boot = case isBootSummary ms of
- NotBoot -> mg_boot
- IsBoot -> extendModuleSet mg_boot (ms_mod ms)
, mg_needs_th_or_qq = mg_needs_th_or_qq || isTemplateHaskellOrQQNonBoot ms
}
where