summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-01-17 16:59:52 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-01-18 16:14:37 -0500
commit01254ceb5173ddb179c6ead0d6b60f7ac5a86e83 (patch)
treea2c0aeecf254345850d97d20ddeeecc55cf85b23
parent5a6efd218734dbb5c1350531680cd3f4177690f1 (diff)
downloadhaskell-01254ceb5173ddb179c6ead0d6b60f7ac5a86e83.tar.gz
Add note about heap invariant
Closed #20904
-rw-r--r--compiler/GHC/Driver/Make.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs
index afeec69c8e..fb823e842f 100644
--- a/compiler/GHC/Driver/Make.hs
+++ b/compiler/GHC/Driver/Make.hs
@@ -2663,4 +2663,10 @@ which can be checked easily using ghc-debug.
as it should be as we retain a copy of the ModDetails for too long.
Where? pruneCache in GHC.Driver.Make
+4. No TcGblEnv or TcLclEnv are live after typechecking is completed.
+ Why? By the time we get to simplification all the data structures from typechecking
+ should be eliminated.
+ Where? No one place in the compiler. These leaks can be introduced by not suitable
+ forcing functions which take a TcLclEnv as an argument.
+
-}