Hannes Siebenhandl pushed to branch wip/fendor/external-unit-db-cache at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • compiler/GHC/Unit/External/Index.hs
    ... ... @@ -301,7 +301,10 @@ updateWiredInUnitIndex wired_map pkgs unit_index = do
    301 301
       ui <- readUnitIndex unit_index
    
    302 302
       let
    
    303 303
         all_pkgs = updateWiredInUnits wired_map (ui_unitInfoMap ui) pkgs
    
    304
    -    (new_pkgs, _pkgs_set) = partitionEithers all_pkgs
    
    304
    +    (new_pkgs', _pkgs_set) = partitionEithers all_pkgs
    
    305
    +  -- Make sure we force the 'UnitInfo' here.
    
    306
    +  -- Otherwise, we will retain a reference to the old 'UnitInfo'
    
    307
    +  new_pkgs <- traverse evaluateUnitInfoLists new_pkgs'
    
    305 308
       modifyUnitIndexCache unit_index (addUnitInfoMap $ mkUnitInfoMap new_pkgs)
    
    306 309
       pure (map (either id id) all_pkgs)
    
    307 310