Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC

Commits:

2 changed files:

Changes:

  • compiler/GHC/Core/Opt/WorkWrap/Utils.hs
    ... ... @@ -1367,13 +1367,8 @@ It's surprisingly subtle.
    1367 1367
       application; see test `T27627f`.
    
    1368 1368
     
    
    1369 1369
     TL;DR: we play safe: we never make an absent filler for any /constraint-kinded/ type,
    
    1370
    -using `isPredTy` to decide.
    
    1371
    -
    
    1372
    -  * `mkAbsentFiller` returns `Nothing` for any constraint type, so worker/wrapper
    
    1373
    -    keeps the real argument.
    
    1374
    -
    
    1375
    -  * `Specialise.specHeader` calls `mkAbsentFiller` too, so it likewise keeps the
    
    1376
    -    dead dictionary argument rather than dropping it for a filler.
    
    1370
    +using `isPredTy` to decide: `mkAbsentFiller` returns `Nothing` for any constraint
    
    1371
    +type, so worker/wrapper keeps the real argument.
    
    1377 1372
     
    
    1378 1373
     Prior failed approaches
    
    1379 1374
     
    

  • compiler/GHC/Unit/State.hs
    ... ... @@ -369,10 +369,15 @@ data UnitState = UnitState {
    369 369
       -- is always mentioned before the units it depends on.
    
    370 370
       preloadUnits      :: [UnitId],
    
    371 371
     
    
    372
    -  -- | Units which we explicitly depend on (from a command line flag).
    
    373
    -  -- We'll use this to generate version macros and the unused packages warning. The
    
    374
    -  -- original flag which was used to bring the unit into scope is recorded for the
    
    375
    -  -- -Wunused-packages warning.
    
    372
    +  -- | The units that can be used by the respective home unit. Despite the
    
    373
    +  -- identifier, this does not just cover units that are enabled explicitly
    
    374
    +  -- using flags but also units from the package database that are enabled
    
    375
    +  -- implicitly in case @-hide-all-packages@ is absent. The former are paired
    
    376
    +  -- with 'Just' applied to the respective flags, the latter are paired with
    
    377
    +  -- 'Nothing'.
    
    378
    +  --
    
    379
    +  -- This field is used for generating version macros and “unused packages”
    
    380
    +  -- warnings.
    
    376 381
       explicitUnits :: [(Unit, Maybe PackageArg)],
    
    377 382
     
    
    378 383
       homeUnitDepends    :: Set UnitId,
    
    ... ... @@ -907,7 +912,7 @@ mkUnitState logger unit_index cfg = do
    907 912
       let pkgname_map = listToUFM [ (unitPackageName p, unitInstanceOf p)
    
    908 913
                                   | p <- pkgs2
    
    909 914
                                   ]
    
    910
    -  -- The explicitUnits accurately reflects the set of units we have turned
    
    915
    +  -- The explicitUnits accurately reflects the set of units that are turned
    
    911 916
       -- on; as such, it also is the only way one can come up with requirements.
    
    912 917
       -- The requirement context is directly based off of this: we simply
    
    913 918
       -- look for nested unit IDs that are directly fed holes: the requirements