diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-10-08 09:59:02 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-12 19:17:15 -0400 |
commit | 0d7117916541d6bb0041200e128ce4088086a973 (patch) | |
tree | 6dcda6104b966e0a89ccf82196c26d2b965718e3 /compiler/GHC/Unit/Home/ModInfo.hs | |
parent | 053d9deb3c107db0d292a6a8dc4ba8cf2d432743 (diff) | |
download | haskell-0d7117916541d6bb0041200e128ce4088086a973.tar.gz |
More strictness around HomePackageTable
This patch makes some operations to do with HomePackageTable stricter
* Adding a new entry into the HPT would not allow the old HomeModInfo to be
collected because the function used by insertWith wouldn't be forced.
* We're careful to force the new MVar value before it's inserted into
the global MVar as otherwise we retain references to old entries.
Diffstat (limited to 'compiler/GHC/Unit/Home/ModInfo.hs')
-rw-r--r-- | compiler/GHC/Unit/Home/ModInfo.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/GHC/Unit/Home/ModInfo.hs b/compiler/GHC/Unit/Home/ModInfo.hs index d41bc0c9f6..b5960a5223 100644 --- a/compiler/GHC/Unit/Home/ModInfo.hs +++ b/compiler/GHC/Unit/Home/ModInfo.hs @@ -41,10 +41,12 @@ data HomeModInfo = HomeModInfo -- ^ The basic loaded interface file: every loaded module has one of -- these, even if it is imported from another package - , hm_details :: !ModDetails + , hm_details :: ModDetails -- ^ Extra information that has been created from the 'ModIface' for -- the module, typically during typechecking + -- This field is LAZY because a ModDetails is constructed by knot tying. + , hm_linkable :: !(Maybe Linkable) -- ^ The actual artifact we would like to link to access things in -- this module. |