[Git][ghc/ghc][wip/hackage-bindist] Apply 2 suggestion(s) to 1 file(s)

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Thu Oct 27 11:24:58 UTC 2022



Matthew Pickering pushed to branch wip/hackage-bindist at Glasgow Haskell Compiler / GHC


Commits:
1880a2f9 by sheaf at 2022-10-27T11:24:56+00:00
Apply 2 suggestion(s) to 1 file(s)
- - - - -


1 changed file:

- compiler/GHC/HsToCore/Usage.hs


Changes:

=====================================
compiler/GHC/HsToCore/Usage.hs
=====================================
@@ -236,10 +236,13 @@ mk_mod_usage_info uc home_unit this_mod direct_imports used_names
             where occ = nameOccName name
 
     mkUsageM :: Module -> IfG (Maybe Usage)
-    mkUsageM mod | mod == this_mod
-                  || moduleUnit mod == interactiveUnit = return Nothing
+    mkUsageM mod | mod == this_mod -- We don't care about usages of things in *this* module
+                 || moduleUnit mod == interactiveUnit -- ... or in GHCi
+                 = return Nothing
     mkUsageM mod = do
       iface <- loadSysInterface (text "mk_mod_usage") mod
+        -- Make sure the interface is loaded even if we don't directly use
+        -- any symbols from it, to ensure determinism. See #22217.
       return $ mkUsage mod iface
 
 



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1880a2f97bf09c7b82e14d6b1480e77e5e286263
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/20221027/9e8ce63e/attachment-0001.html>


More information about the ghc-commits mailing list