[commit: ghc] master: Add a simplifier trace for eta-expansion (e913676)
git at git.haskell.org
git at git.haskell.org
Wed Nov 25 16:30:41 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/e9136762ee984451c45cd1067a41d7b7d5be0e19/ghc
>---------------------------------------------------------------
commit e9136762ee984451c45cd1067a41d7b7d5be0e19
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Nov 25 16:27:45 2015 +0000
Add a simplifier trace for eta-expansion
>---------------------------------------------------------------
e9136762ee984451c45cd1067a41d7b7d5be0e19
compiler/simplCore/SimplUtils.hs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/compiler/simplCore/SimplUtils.hs b/compiler/simplCore/SimplUtils.hs
index 1577efd..4a56041 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)
More information about the ghc-commits
mailing list