Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reinier Maas
GHC
Commits
a10ed3e6
Commit
a10ed3e6
authored
11 years ago
by
Simon Peyton Jones
Browse files
Options
Downloads
Patches
Plain Diff
Comments only
parent
9c9bb003
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compiler/coreSyn/CoreArity.lhs
+6
-6
6 additions, 6 deletions
compiler/coreSyn/CoreArity.lhs
with
6 additions
and
6 deletions
compiler/coreSyn/CoreArity.lhs
+
6
−
6
View file @
a10ed3e6
...
...
@@ -323,10 +323,10 @@ this transformation. So we try to limit it as much as possible:
going to diverge eventually anyway then getting the best arity
isn't an issue, so we might as well play safe
(3) Do NOT move a lambda outside a case unless
(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-
bottom
s
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]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment