summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-11-25 16:27:45 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2015-11-25 16:30:52 +0000
commite9136762ee984451c45cd1067a41d7b7d5be0e19 (patch)
tree774a0604a2acb4673fceb6c38a9bd2b1ac4caf13
parente9a4c0995ad1f3c4bbe6252af7e3146dc740bb31 (diff)
downloadhaskell-e9136762ee984451c45cd1067a41d7b7d5be0e19.tar.gz
Add a simplifier trace for eta-expansion
-rw-r--r--compiler/simplCore/SimplUtils.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/simplCore/SimplUtils.hs b/compiler/simplCore/SimplUtils.hs
index 1577efda37..4a5604196b 100644
--- a/compiler/simplCore/SimplUtils.hs
+++ b/compiler/simplCore/SimplUtils.hs
@@ -1302,7 +1302,10 @@ mkLam bndrs body cont
, let body_arity = exprEtaExpandArity dflags body
, body_arity > 0
= do { tick (EtaExpansion (head bndrs))
- ; return (mkLams bndrs (etaExpand body_arity body)) }
+ ; let res = mkLams bndrs (etaExpand body_arity body)
+ ; traceSmpl "eta expand" (vcat [text "before" <+> ppr (mkLams bndrs body)
+ , text "after" <+> ppr res])
+ ; return res }
| otherwise
= return (mkLams bndrs body)