[Git][ghc/ghc][master] Revert mapMG renaming

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Dec 9 21:28:14 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
ed1ed5c6 by Rodrigo Mesquita at 2024-12-09T16:26:19-05:00
Revert mapMG renaming

We had previously renamed this function for consistency, but that caused unnecessary breakage

- - - - -


2 changed files:

- compiler/GHC.hs
- compiler/GHC/Unit/Module/Graph.hs


Changes:

=====================================
compiler/GHC.hs
=====================================
@@ -74,7 +74,7 @@ module GHC (
         compileToCoreModule, compileToCoreSimplified,
 
         -- * Inspecting the module structure of the program
-        ModuleGraph, emptyMG, mgMap, mkModuleGraph, mgModSummaries,
+        ModuleGraph, emptyMG, mapMG, mkModuleGraph, mgModSummaries,
         mgLookupModule,
         ModSummary(..), ms_mod_name, ModLocation(..),
         pattern ModLocation,
@@ -874,7 +874,7 @@ setProgramDynFlags_ invalidate_needed dflags = do
 --
 invalidateModSummaryCache :: GhcMonad m => m ()
 invalidateModSummaryCache =
-  modifySession $ \h -> h { hsc_mod_graph = mgMap inval (hsc_mod_graph h) }
+  modifySession $ \h -> h { hsc_mod_graph = mapMG inval (hsc_mod_graph h) }
  where
   inval ms = ms { ms_hs_hash = fingerprint0 }
 


=====================================
compiler/GHC/Unit/Module/Graph.hs
=====================================
@@ -46,7 +46,7 @@ module GHC.Unit.Module.Graph
     -- (without changing the 'ModuleGraph' structure itself!).
     -- 'mgModSummaries' lists out all 'ModSummary's, and
     -- 'mgLookupModule' looks up a 'ModSummary' for a given module.
-   , mgMap, mgMapM
+   , mapMG, mgMapM
    , mgModSummaries
    , mgLookupModule
 
@@ -239,8 +239,8 @@ lengthMG = length . mg_mss
 
 -- | Map a function 'f' over all the 'ModSummaries'.
 -- To preserve invariants, 'f' can't change the isBoot status.
-mgMap :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph
-mgMap f mg at ModuleGraph{..} = mg
+mapMG :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph
+mapMG f mg at ModuleGraph{..} = mg
   { mg_mss = flip fmap mg_mss $ \case
       InstantiationNode uid iuid -> InstantiationNode uid iuid
       LinkNode uid nks -> LinkNode uid nks



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ed1ed5c6d8a7cb934fe7b91c3e03cce4556dcc71

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ed1ed5c6d8a7cb934fe7b91c3e03cce4556dcc71
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241209/fb269f2f/attachment-0001.html>


More information about the ghc-commits mailing list