reinstate eta-expansion during SimplGently, to fix inlining of sequence_
authorSimon Marlow <marlowsd@gmail.com>
Fri, 23 Apr 2010 12:48:53 +0000 (12:48 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 23 Apr 2010 12:48:53 +0000 (12:48 +0000)
compiler/simplCore/SimplUtils.lhs

index 500f286..fbee984 100644 (file)
@@ -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') }