summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core/Opt/Simplify.hs
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2022-01-05 19:58:05 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-01-11 19:43:22 -0500
commit23d215fcb62c8bfe8d56396a0c9718a72ac0037b (patch)
tree520a04b518f1898c7c6685679aafafbb8f1d5942 /compiler/GHC/Core/Opt/Simplify.hs
parent49731fed69cb67ebaa3481b6ed5395ccd760c051 (diff)
downloadhaskell-23d215fcb62c8bfe8d56396a0c9718a72ac0037b.tar.gz
warnPprTrace: pass separately the reason
This makes it more similar to pprTrace, pprPanic etc.
Diffstat (limited to 'compiler/GHC/Core/Opt/Simplify.hs')
-rw-r--r--compiler/GHC/Core/Opt/Simplify.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Opt/Simplify.hs b/compiler/GHC/Core/Opt/Simplify.hs
index 0e945043b6..b21d931c25 100644
--- a/compiler/GHC/Core/Opt/Simplify.hs
+++ b/compiler/GHC/Core/Opt/Simplify.hs
@@ -3170,6 +3170,7 @@ addBinderUnfolding :: SimplEnv -> Id -> Unfolding -> SimplEnv
addBinderUnfolding env bndr unf
| debugIsOn, Just tmpl <- maybeUnfoldingTemplate unf
= warnPprTrace (not (eqType (idType bndr) (exprType tmpl)))
+ "unfolding type mismatch"
(ppr bndr $$ ppr (idType bndr) $$ ppr tmpl $$ ppr (exprType tmpl)) $
modifyInScope env (bndr `setIdUnfolding` unf)
@@ -3336,7 +3337,7 @@ missingAlt :: SimplEnv -> Id -> [InAlt] -> SimplCont
-- it "sees" that the entire branch of an outer case is
-- inaccessible. So we simply put an error case here instead.
missingAlt env case_bndr _ cont
- = warnPprTrace True (text "missingAlt" <+> ppr case_bndr) $
+ = warnPprTrace True "missingAlt" (ppr case_bndr) $
-- See Note [Avoiding space leaks in OutType]
let cont_ty = contResultType cont
in seqType cont_ty `seq`