summaryrefslogtreecommitdiff
path: root/compiler/GHC/Builtin
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-09-13 14:50:29 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-17 14:06:08 -0400
commit65bf3992aebb3c08f0c4e13a3fb89dd5620015a9 (patch)
tree829b10ecd01913dc32710182f0f73519e2f9414a /compiler/GHC/Builtin
parentc9922a8e4d598f1c6a048305ca58d0ecf34d6776 (diff)
downloadhaskell-65bf3992aebb3c08f0c4e13a3fb89dd5620015a9.tar.gz
ghci: Explicitly store and restore interface file cache
In the old days the old HPT was used as an interface file cache when using ghci. The HPT is a `ModuleEnv HomeModInfo` and so if you were using hs-boot files then the interface file from compiling the .hs file would be present in the cache but not the hi-boot file. This used to be ok, because the .hi file used to just be a better version of the .hi-boot file, with more information so it was fine to reuse it. Now the source hash of a module is kept track of in the interface file and the source hash for the .hs and .hs-boot file are correspondingly different so it's no longer safe to reuse an interface file. I took the decision to move the cache management of interface files to GHCi itself, and provide an API where `load` can be provided with a list of interface files which can be used as a cache. An alternative would be to manage this cache somewhere in the HscEnv but it seemed that an API user should be responsible for populating and suppling the cache rather than having it managed implicitly. Fixes #20217
Diffstat (limited to 'compiler/GHC/Builtin')
0 files changed, 0 insertions, 0 deletions