diff options
author | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2023-03-03 19:47:49 +0000 |
---|---|---|
committer | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2023-03-03 19:47:49 +0000 |
commit | dd742db0e091bd9e9bd235b047a3e1cfb8c592d0 (patch) | |
tree | 4cf5dbd9c9a112c2e3772c6a7ef83b1ff03be80c | |
parent | a9338ff1fd91cb1a9e4a1ba85e55a0913c31bcc8 (diff) | |
download | haskell-dd742db0e091bd9e9bd235b047a3e1cfb8c592d0.tar.gz |
Wibblewip/T22886
-rw-r--r-- | compiler/GHC/Core/Opt/Simplify/Utils.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/GHC/Core/Opt/Simplify/Utils.hs b/compiler/GHC/Core/Opt/Simplify/Utils.hs index b34493ecf9..93ee2d7984 100644 --- a/compiler/GHC/Core/Opt/Simplify/Utils.hs +++ b/compiler/GHC/Core/Opt/Simplify/Utils.hs @@ -1859,8 +1859,7 @@ tryEtaExpandRhs :: SimplEnv -> BindContext -> OutId -> OutExpr -> SimplM (ArityType, OutExpr) -- See Note [Eta-expanding at let bindings] tryEtaExpandRhs env bind_cxt bndr rhs - | pprTrace "tryeta" (ppr bndr $$ ppr do_eta_expand $$ ppr (seEtaExpand env) $$ ppr (wantEtaExpansion rhs)) $ - do_eta_expand -- If the current manifest arity isn't enough + | do_eta_expand -- If the current manifest arity isn't enough -- (never true for join points) , seEtaExpand env -- and eta-expansion is on , wantEtaExpansion rhs @@ -1894,8 +1893,7 @@ wantEtaExpansion e = go e [] go (Lam b e) [] | isTyVar b = go e [] | otherwise = True - go (Var f) args = pprTrace "wantEtaExpansion" (ppr f $$ ppr args $$ ppr (isInlineUnfolding (idUnfolding f)) $$ ppr (any interesting args)) $ - isInlineUnfolding (idUnfolding f) + go (Var f) args = isInlineUnfolding (idUnfolding f) && any interesting args go _ _ = True |