Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
0ab63cf4
Commit
0ab63cf4
authored
Jul 01, 2016
by
niteria
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kill varEnvElts in seqDmdEnv
GHC Trac: #4012
parent
0d522b80
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
compiler/basicTypes/Demand.hs
compiler/basicTypes/Demand.hs
+1
-2
compiler/utils/UniqFM.hs
compiler/utils/UniqFM.hs
+7
-1
No files found.
compiler/basicTypes/Demand.hs
View file @
0ab63cf4
...
...
@@ -1306,8 +1306,7 @@ seqDmdType (DmdType env ds res) =
seqDmdEnv
env
`
seq
`
seqDemandList
ds
`
seq
`
seqDmdResult
res
`
seq
`
()
seqDmdEnv
::
DmdEnv
->
()
seqDmdEnv
env
=
seqDemandList
(
varEnvElts
env
)
seqDmdEnv
env
=
seqEltsUFM
seqDemandList
env
splitDmdTy
::
DmdType
->
(
Demand
,
DmdType
)
-- Split off one function argument
...
...
compiler/utils/UniqFM.hs
View file @
0ab63cf4
...
...
@@ -54,7 +54,7 @@ module UniqFM (
intersectUFM_C
,
disjointUFM
,
nonDetFoldUFM
,
foldUFM
,
nonDetFoldUFM_Directly
,
anyUFM
,
allUFM
,
anyUFM
,
allUFM
,
seqEltsUFM
,
mapUFM
,
mapUFM_Directly
,
elemUFM
,
elemUFM_Directly
,
filterUFM
,
filterUFM_Directly
,
partitionUFM
,
...
...
@@ -292,6 +292,12 @@ anyUFM p (UFM m) = M.fold ((||) . p) False m
allUFM
::
(
elt
->
Bool
)
->
UniqFM
elt
->
Bool
allUFM
p
(
UFM
m
)
=
M
.
fold
((
&&
)
.
p
)
True
m
seqEltsUFM
::
([
elt
]
->
()
)
->
UniqFM
elt
->
()
seqEltsUFM
seqList
=
seqList
.
nonDetEltsUFM
-- It's OK to use nonDetEltsUFM here because the type guarantees that
-- the only interesting thing this function can do is to force the
-- elements.
-- See Note [Deterministic UniqFM] to learn about nondeterminism.
-- If you use this please provide a justification why it doesn't introduce
-- nondeterminism.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment