diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-11-25 16:27:45 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-11-25 16:30:52 +0000 |
commit | e9136762ee984451c45cd1067a41d7b7d5be0e19 (patch) | |
tree | 774a0604a2acb4673fceb6c38a9bd2b1ac4caf13 | |
parent | e9a4c0995ad1f3c4bbe6252af7e3146dc740bb31 (diff) | |
download | haskell-e9136762ee984451c45cd1067a41d7b7d5be0e19.tar.gz |
Add a simplifier trace for eta-expansion
-rw-r--r-- | compiler/simplCore/SimplUtils.hs | 5 |
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) |