summaryrefslogtreecommitdiff
path: root/compiler/coreSyn
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2019-01-06 00:13:22 +0100
committerGabor Greif <ggreif@gmail.com>2019-01-06 00:14:17 +0100
commit8db91a7da4e749427b005346dec6f0554de6ee33 (patch)
treefa89a41abc3c8bb8c8f571329a30506a53ae7367 /compiler/coreSyn
parent23c950f6a113a536d0e2080fa65eb8a0ea8eddbc (diff)
downloadhaskell-wip/T16039.tar.gz
better tracingwip/T16039
Diffstat (limited to 'compiler/coreSyn')
-rw-r--r--compiler/coreSyn/CoreUtils.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs
index ea3fe016b1..87e36b9d29 100644
--- a/compiler/coreSyn/CoreUtils.hs
+++ b/compiler/coreSyn/CoreUtils.hs
@@ -955,14 +955,14 @@ it off at source.
exprIsTrivial :: CoreExpr -> Bool
-- If you modify this function, you may also
--- need to modify getIdFromTrivialExpr
+-- need to modify getIdFromTrivialExpr -- TODO
exprIsTrivial (Var _) = True -- See Note [Variables are trivial]
exprIsTrivial (Type _) = True
exprIsTrivial (Coercion _) = True
exprIsTrivial (Lit lit) = litIsTrivial lit
exprIsTrivial (App e arg)
| App (Var f) Type {} <- e
- , f `hasKey` noinlineIdKey = pprTrace "exprIsTrivial" (ppr arg) exprIsTrivial arg
+ , f `hasKey` noinlineIdKey = pprTrace "exprIsTrivial #%#" (ppr f <+> ppr arg) exprIsTrivial arg
| not (isRuntimeArg arg) = exprIsTrivial e
| otherwise = False
exprIsTrivial (Lam b e) = not (isRuntimeVar b) && exprIsTrivial e
@@ -1244,7 +1244,7 @@ exprIsCheapX ok_app e
| otherwise = go n e
go n (App f e) | App (Var v) Type {} <- f
, v `hasKey` noinlineIdKey
- , isRuntimeArg e = pprTrace "exprIsCheapX" (ppr e) go n e
+ , isRuntimeArg e = pprTrace "exprIsCheapX $#%#" (ppr v <+> ppr e) go n e
go n (App f e) | isRuntimeArg e = go (n+1) f && ok e
| otherwise = go n f
go n (Let (NonRec _ r) e) = go n e && ok r