summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-03-26 09:28:16 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-04-08 08:07:10 -0400
commit8417e8667ccac3a58192c5864f9eaf234a4913b5 (patch)
treef5beb480b6fea85aab6efb67b813c7c02bcbb6e8
parent898afe90c0a11a0c2b243efb75f2d83d17893b30 (diff)
downloadhaskell-8417e8667ccac3a58192c5864f9eaf234a4913b5.tar.gz
Don't retain reference to whole TcLclEnv in SkolemTV
-rw-r--r--compiler/GHC/Tc/Utils/Instantiate.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Utils/Instantiate.hs b/compiler/GHC/Tc/Utils/Instantiate.hs
index 6238b6c36c..601cd0a8ea 100644
--- a/compiler/GHC/Tc/Utils/Instantiate.hs
+++ b/compiler/GHC/Tc/Utils/Instantiate.hs
@@ -542,7 +542,8 @@ tcInstSkolTyVarsPushLevel :: Bool -- True <=> make "super skolem"
-- See Note [Skolemising type variables]
tcInstSkolTyVarsPushLevel overlappable subst tvs
= do { tc_lvl <- getTcLevel
- ; let pushed_lvl = pushTcLevel tc_lvl
+ -- Do not retain the whole TcLclEnv
+ ; let !pushed_lvl = pushTcLevel tc_lvl
; tcInstSkolTyVarsAt pushed_lvl overlappable subst tvs }
tcInstSkolTyVarsAt :: TcLevel -> Bool