[commit: ghc] master: Comments only (a10ed3e)

git at git.haskell.org git at git.haskell.org
Tue Mar 11 11:16:07 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a10ed3e64336e272137e1743c36970b36f7076c7/ghc

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

commit a10ed3e64336e272137e1743c36970b36f7076c7
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Mar 6 11:54:33 2014 +0000

    Comments only


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

a10ed3e64336e272137e1743c36970b36f7076c7
 compiler/coreSyn/CoreArity.lhs |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/compiler/coreSyn/CoreArity.lhs b/compiler/coreSyn/CoreArity.lhs
index 080a6fd..12d4274 100644
--- a/compiler/coreSyn/CoreArity.lhs
+++ b/compiler/coreSyn/CoreArity.lhs
@@ -325,8 +325,8 @@ this transformation.  So we try to limit it as much as possible:
 
  (3) Do NOT move a lambda outside a case unless
      (a) The scrutinee is ok-for-speculation, or
-     (b) more liberally: the scrutinee is cheap and -fpedantic-bottoms is not
-         enforced
+     (b) more liberally: the scrutinee is cheap (e.g. a variable), and
+         -fpedantic-bottoms is not enforced (see Trac #2915 for an example)
 
 Of course both (1) and (2) are readily defeated by disguising the bottoms.
 
@@ -753,10 +753,10 @@ arityType env (Case scrut _ _ alts)
      	     | otherwise -> ABot 0     -- if RHS is bottomming
     			               -- See Note [Dealing with bottom (2)]
 
-     ATop as | not (ae_ped_bot env)    -- Check -fpedantic-bottoms
+     ATop as | not (ae_ped_bot env)    -- See Note [Dealing with bottom (3)]
              , ae_cheap_fn env scrut Nothing -> ATop as
-             | exprOkForSpeculation scrut -> ATop as
-             | otherwise                  -> ATop (takeWhile isOneShotInfo as)
+             | exprOkForSpeculation scrut    -> ATop as
+             | otherwise                     -> ATop (takeWhile isOneShotInfo as)
   where
     alts_type = foldr1 andArityType [arityType env rhs | (_,_,rhs) <- alts]
 



More information about the ghc-commits mailing list