summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-08-25 18:30:46 +0200
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-08-25 18:52:26 +0200
commitf9f1349054a89b79e2fee548dc3af48d840dd0a4 (patch)
tree66931ff8210f5d0d74213c9181bcb62013dfd706
parent6b5a054d250a6fde60fead63ec1032dfb5f9481c (diff)
downloadhaskell-wip/T20200b-panic.tar.gz
Restore panic in lookupIdSubstwip/T20200b-panic
-rw-r--r--compiler/GHC/Core/Subst.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/GHC/Core/Subst.hs b/compiler/GHC/Core/Subst.hs
index 83e91ad21a..bd3d2b5e9a 100644
--- a/compiler/GHC/Core/Subst.hs
+++ b/compiler/GHC/Core/Subst.hs
@@ -61,7 +61,6 @@ import GHC.Types.Unique.Supply
import GHC.Builtin.Names
import GHC.Data.Maybe
-import GHC.Utils.Trace
import GHC.Utils.Misc
import GHC.Utils.Outputable
import GHC.Utils.Panic
@@ -255,11 +254,10 @@ lookupIdSubst s@(Subst in_scope ids _ _) v
| not (isLocalId v) = Var v
| Just e <- lookupVarEnv ids v = e
| Just v' <- lookupInScope in_scope v = Var v'
- -- Vital! See Note [Extending the Subst]
+ -- If v isn't in the InScopeSet, we panic, because
+ -- it's a bad bug and we reallly want to know
-- See #20200
- | otherwise = warnPprTrace True (text "GHC.Core.Subst.lookupIdSubst" <+> ppr v
- $$ ppr s) $
- Var v
+ | otherwise = pprPanic "lookupIdSubst" (ppr v $$ ppr s $$ ppr in_scope)
delBndr :: Subst -> Var -> Subst
delBndr (Subst in_scope ids tvs cvs) v