From 909904c56923c018b03339a85af958cfa148dbc7 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 23 Apr 2010 12:48:53 +0000 Subject: [PATCH] reinstate eta-expansion during SimplGently, to fix inlining of sequence_ --- compiler/simplCore/SimplUtils.lhs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/compiler/simplCore/SimplUtils.lhs b/compiler/simplCore/SimplUtils.lhs index 500f286..fbee984 100644 --- a/compiler/simplCore/SimplUtils.lhs +++ b/compiler/simplCore/SimplUtils.lhs @@ -1010,7 +1010,7 @@ mkLam :: SimplEnv -> [OutBndr] -> OutExpr -> SimplM OutExpr mkLam _b [] body = return body -mkLam env bndrs body +mkLam _env bndrs body = do { dflags <- getDOptsSmpl ; mkLam' dflags bndrs body } where @@ -1031,9 +1031,6 @@ mkLam env bndrs body ; return etad_lam } | dopt Opt_DoLambdaEtaExpansion dflags, - not (inGentleMode env), -- In gentle mode don't eta-expansion - -- because it can clutter up the code - -- with casts etc that may not be removed not (all isTyVar bndrs) -- Don't eta expand type abstractions = do { let body' = tryEtaExpansion dflags body ; return (mkLams bndrs body') } -- 1.7.10.4