Commit 5c7ced0f authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Comments only

parent a8b7b28c
......@@ -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"
......
......@@ -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]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment