[Git][ghc/ghc][wip/unitidset] lint

Josh Meredith (@JoshMeredith) gitlab at gitlab.haskell.org
Wed Apr 26 04:05:08 UTC 2023



Josh Meredith pushed to branch wip/unitidset at Glasgow Haskell Compiler / GHC


Commits:
9d972155 by Josh Meredith at 2023-04-26T04:04:56+00:00
lint

- - - - -


2 changed files:

- compiler/GHC/Linker/Types.hs
- ghc/GHCi/UI.hs


Changes:

=====================================
compiler/GHC/Linker/Types.hs
=====================================
@@ -53,7 +53,6 @@ import Control.Concurrent.MVar
 import Data.Time               ( UTCTime )
 import Data.Maybe
 import GHC.Unit.Module.Env
-import GHC.Types.Unique.DSet
 import GHC.Types.Unique.DFM
 import GHC.Unit.Module.WholeCoreBindings
 


=====================================
ghc/GHCi/UI.hs
=====================================
@@ -563,7 +563,7 @@ interactiveUI config srcs maybe_exprs = do
            -- Set to True because Prelude is implicitly imported.
            impDecl at ImportDecl{ideclExt=ext} -> impDecl{ideclExt = ext{ideclImplicit=True}}
    hsc_env <- GHC.getSession
-   let in_multi = length (hsc_all_home_unit_ids hsc_env) > 1
+   let in_multi = sizeUniqDSet (hsc_all_home_unit_ids hsc_env) > 1
    empty_cache <- liftIO newIfaceCache
    startGHCi (runGHCi srcs maybe_exprs)
         GHCiState{ progname           = default_progname,
@@ -2576,7 +2576,7 @@ isSafeModule m = do
     case msafe && isEmptyUniqDSet bad of
         True -> liftIO $ putStrLn $ mname ++ " is trusted!"
         False -> do
-            when (not $ null bad)
+            when (not $ emptyUniqDSet bad)
                  (liftIO $ putStrLn $ "Trusted package dependencies (untrusted): "
                             ++ (intercalate ", " $ map (showPpr dflags) (uniqDSetToList bad)))
             liftIO $ putStrLn $ mname ++ " is NOT trusted!"



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9d972155c4a768defc2763bc594215d1da474cd4
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/20230426/4c58491d/attachment-0001.html>


More information about the ghc-commits mailing list