Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/ec0118503aa1981844b90c5f03768dfb683331ae

>---------------------------------------------------------------

commit ec0118503aa1981844b90c5f03768dfb683331ae
Author: Simon Peyton Jones <[email protected]>
Date:   Tue Aug 23 13:43:22 2011 +0100

    Comments only

>---------------------------------------------------------------

 compiler/simplCore/SetLevels.lhs |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/compiler/simplCore/SetLevels.lhs b/compiler/simplCore/SetLevels.lhs
index 618bf35..801c1b4 100644
--- a/compiler/simplCore/SetLevels.lhs
+++ b/compiler/simplCore/SetLevels.lhs
@@ -344,7 +344,8 @@ lvlExpr ctxt_lvl env (_, AnnCase scrut@(scrut_fvs,_) 
case_bndr ty alts)
   | [(con@(DataAlt {}), bs, rhs)] <- alts
   , exprOkForSpeculation (deAnnotate scrut)
   , not (isTopLvl dest_lvl)    -- Can't have top-level cases
-  =    -- Float the case
+  =    -- Always float the case if possible
+       -- Unlike lets we don't insist that it escapes a value lambda
     do { scrut' <- lvlMFE True ctxt_lvl env scrut
        ; (rhs_env, (case_bndr':bs')) <- cloneVars env (case_bndr:bs) dest_lvl
                           -- We don't need to use extendCaseBndrLvlEnv here
@@ -791,7 +792,7 @@ data LevelEnv
   = LE { le_switches :: FloatOutSwitches
        , le_lvl_env  :: VarEnv Level   -- Domain is *post-cloned* TyVars and 
Ids
        , le_subst    :: Subst          -- Domain is pre-cloned Ids; tracks the 
in-scope set
-                                       --      so that subtitution is 
capture-avoiding
+                                       --      so that substitution is 
capture-avoiding
        , le_env      :: IdEnv ([Var], LevelledExpr)    -- Domain is pre-cloned 
Ids
     }
        -- We clone let-bound variables so that they are still



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to