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
Naïm Favier
GHC
Commits
e6ffe148
Commit
e6ffe148
authored
5 years ago
by
Ömer Sinan Ağacan
Committed by
Marge Bot
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
TidyPgm: replace an explicit loop with mapAccumL
parent
1593debf
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/main/TidyPgm.hs
+2
-7
2 additions, 7 deletions
compiler/main/TidyPgm.hs
with
2 additions
and
7 deletions
compiler/main/TidyPgm.hs
+
2
−
7
View file @
e6ffe148
...
...
@@ -63,7 +63,7 @@ import qualified ErrUtils as Err
import
Control.Monad
import
Data.Function
import
Data.List
(
sortBy
)
import
Data.List
(
sortBy
,
mapAccumL
)
import
Data.IORef
(
atomicModifyIORef'
)
{-
...
...
@@ -1089,12 +1089,7 @@ tidyTopBinds hsc_env this_mod unfold_env init_occ_env binds
init_env
=
(
init_occ_env
,
emptyVarEnv
)
tidy
_
env
[]
=
(
env
,
[]
)
tidy
cvt_literal
env
(
b
:
bs
)
=
let
(
env1
,
b'
)
=
tidyTopBind
dflags
this_mod
cvt_literal
unfold_env
env
b
(
env2
,
bs'
)
=
tidy
cvt_literal
env1
bs
in
(
env2
,
b'
:
bs'
)
tidy
cvt_literal
=
mapAccumL
(
tidyTopBind
dflags
this_mod
cvt_literal
unfold_env
)
------------------------
tidyTopBind
::
DynFlags
...
...
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