From e9136762ee984451c45cd1067a41d7b7d5be0e19 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Wed, 25 Nov 2015 16:27:45 +0000 Subject: Add a simplifier trace for eta-expansion --- 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 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) -- cgit v1.2.1