[commit: ghc] master: Comments only (5c7ced0)
git at git.haskell.org
git at git.haskell.org
Mon Mar 24 10:27:10 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/5c7ced0fd1bb67cadf9a7e5be112701bfcb4631b/ghc
>---------------------------------------------------------------
commit 5c7ced0fd1bb67cadf9a7e5be112701bfcb4631b
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Mon Mar 24 08:27:20 2014 +0000
Comments only
>---------------------------------------------------------------
5c7ced0fd1bb67cadf9a7e5be112701bfcb4631b
compiler/coreSyn/CoreSyn.lhs | 2 +-
compiler/simplCore/Simplify.lhs | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/compiler/coreSyn/CoreSyn.lhs b/compiler/coreSyn/CoreSyn.lhs
index 47a993e..defd669 100644
--- a/compiler/coreSyn/CoreSyn.lhs
+++ b/compiler/coreSyn/CoreSyn.lhs
@@ -395,7 +395,7 @@ Here's another example:
f :: T -> Bool
f = \(x:t). case x of Bool {}
Since T has no data constructors, the case alternatives are of course
-empty. However note that 'x' is not bound to a visbily-bottom value;
+empty. However note that 'x' is not bound to a visibly-bottom value;
it's the *type* that tells us it's going to diverge. Its a bit of a
degnerate situation but we do NOT want to replace
case x of Bool {} --> error Bool "Inaccessible case"
diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs
index e1327a6..6105133 100644
--- a/compiler/simplCore/Simplify.lhs
+++ b/compiler/simplCore/Simplify.lhs
@@ -1734,10 +1734,10 @@ case-binder is evaluated *next*. Previously we just asked that
the case-binder is used strictly; but that can change
case x of { _ -> error "bad" }
--> error "bad"
-which is very puzzling if 'x' is later bound to (error "good").
-Where the order of evaluation is specified (via seq or case)
-we should respect it.
-See also Note [Empty case alternatives] in CoreSyn.
+which is very puzzling if 'x' currently lambda-bound, but later gets
+let-bound to (error "good"). Where the order of evaluation is
+specified (via seq or case) we should respect it. See also Note
+[Empty case alternatives] in CoreSyn.
So instead we use case_bndr_evald_next to see when f is the *next*
thing to be eval'd. This came up when fixing Trac #7542.
@@ -1751,7 +1751,7 @@ See also Note [Eta reduction of an eval'd function] in CoreUtils.
scrut_is_var _ = False
-- True if evaluation of the case_bndr is the next
- -- thing to be eval'd. Then dropping the case
+ -- thing to be eval'd. Then dropping the case is fine.
Note [Case elimination: unlifted case]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the ghc-commits
mailing list