diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-11-22 11:10:51 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-23 22:00:15 -0500 |
commit | 11627c422cfba5e1d84afb08f427007dbc801f10 (patch) | |
tree | b2ea634c9de3979d94e54d25a4c66abbf7127fdc /compiler/GHC/Iface/Load.hs | |
parent | 178c1fd830c78377ef5d338406a41e1d8eb5f0da (diff) | |
download | haskell-11627c422cfba5e1d84afb08f427007dbc801f10.tar.gz |
notes: Fix references to HPT space leak note
Updating this note was missed when updating the HPT to the HUG.
Fixes #22477
Diffstat (limited to 'compiler/GHC/Iface/Load.hs')
-rw-r--r-- | compiler/GHC/Iface/Load.hs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/compiler/GHC/Iface/Load.hs b/compiler/GHC/Iface/Load.hs index b169db60f5..9bf2aaccc8 100644 --- a/compiler/GHC/Iface/Load.hs +++ b/compiler/GHC/Iface/Load.hs @@ -602,8 +602,11 @@ This really happens in practice. The module "GHC.Hs.Expr" gets This is a mess. -Note [HPT space leak] (#15111) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Note [Home Unit Graph space leak] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Ticket: #15111 + In IfL, we defer some work until it is demanded using forkM, such as building TyThings from IfaceDecls. These thunks are stored in the ExternalPackageState, and they might never be poked. If we're @@ -614,14 +617,15 @@ for ever. Therefore, when loading a package interface file , we use a "clean" version of the HscEnv with all the data about the currently loaded program stripped out. Most of the fields can be panics because -we'll never read them, but hsc_HPT needs to be empty because this +we'll never read them, but hsc_HUG needs to be empty because this interface will cause other interfaces to be loaded recursively, and -when looking up those interfaces we use the HPT in loadInterface. +when looking up those interfaces we use the HUG in loadInterface. We know that none of the interfaces below here can refer to -home-package modules however, so it's safe for the HPT to be empty. +home-package modules however, so it's safe for the HUG to be empty. -} -- Note [GHC Heap Invariants] +-- Note [Home Unit Graph space leak] dontLeakTheHUG :: IfL a -> IfL a dontLeakTheHUG thing_inside = do env <- getTopEnv |