summaryrefslogtreecommitdiff
path: root/compiler/GHC
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-05-18 10:06:25 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2022-05-19 12:24:24 +0100
commitb66fd9a182ad732847b7c90aef3e6bdc7956dd62 (patch)
tree5d753b065b742d0ba2c8999ae57abb2ccd186d84 /compiler/GHC
parent35bdab1cb97f0be0ebea7cc93b977759f51d976c (diff)
downloadhaskell-wip/T21555.tar.gz
Remove pprTrace from pushCoercionIntoLambda (#21555)wip/T21555
This firstly caused spurious output to be emitted (as evidenced by #21555) but even worse caused a massive coercion to be attempted to be printed (> 200k terms) which would invariably eats up all the memory of your computer. The good news is that removing this trace allows the program to compile to completion, the bad news is that the program exhibits a core lint error (on 9.0.2) but not any other releases it seems. Fixes #21577 and #21555
Diffstat (limited to 'compiler/GHC')
-rw-r--r--compiler/GHC/Core/Opt/Arity.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Opt/Arity.hs b/compiler/GHC/Core/Opt/Arity.hs
index b318c75f59..f1cc2bd4ea 100644
--- a/compiler/GHC/Core/Opt/Arity.hs
+++ b/compiler/GHC/Core/Opt/Arity.hs
@@ -1794,7 +1794,8 @@ pushCoercionIntoLambda in_scope x e co
-- so we extend the substitution with x |-> (x' |> sym co1).
in Just (x', substExpr subst e `mkCast` co2)
| otherwise
- = pprTrace "exprIsLambda_maybe: Unexpected lambda in case" (ppr (Lam x e))
+ -- See #21555 / #21577 for a case where this trace fired but the cause was benign
+ = -- pprTrace "exprIsLambda_maybe: Unexpected lambda in case" (ppr (Lam x e))
Nothing
pushCoDataCon :: DataCon -> [CoreExpr] -> Coercion