Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv2v
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
sv2v
Commits
cc9f7f46
Commit
cc9f7f46
authored
Jul 15, 2020
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove old scopedConversion
parent
4c173d86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
40 deletions
+0
-40
src/Convert/Traverse.hs
+0
-40
No files found.
src/Convert/Traverse.hs
View file @
cc9f7f46
...
...
@@ -85,9 +85,6 @@ module Convert.Traverse
,
traverseNestedLHSs
,
collectNestedLHSsM
,
traverseScopesM
,
scopedConversion
,
scopedConversionM
,
stately
,
traverseFilesM
,
traverseFiles
,
traverseSinglyNestedGenItemsM
...
...
@@ -1125,44 +1122,6 @@ traverseScopesM declMapper moduleItemMapper stmtMapper =
put
prevState
return
item'
-- applies the given decl conversion across the description, and then performs a
-- scoped traversal for each ModuleItem in the description
scopedConversion
::
(
Eq
s
,
Show
s
)
=>
MapperM
(
State
s
)
Decl
->
MapperM
(
State
s
)
ModuleItem
->
MapperM
(
State
s
)
Stmt
->
s
->
Description
->
Description
scopedConversion
traverseDeclM
traverseModuleItemM
traverseStmtM
s
description
=
runIdentity
$
scopedConversionM
traverseDeclM
traverseModuleItemM
traverseStmtM
s
description
scopedConversionM
::
(
Eq
s
,
Show
s
)
=>
Monad
m
=>
MapperM
(
StateT
s
m
)
Decl
->
MapperM
(
StateT
s
m
)
ModuleItem
->
MapperM
(
StateT
s
m
)
Stmt
->
s
->
Description
->
m
Description
scopedConversionM
traverseDeclM
traverseModuleItemM
traverseStmtM
s
description
=
evalStateT
(
initialTraverse
description
>>=
scopedTraverse
)
s
where
initialTraverse
=
traverseModuleItemsM
traverseMIPackageItemDecl
scopedTraverse
=
traverseModuleItemsM
$
traverseScopesM
traverseDeclM
traverseModuleItemM
traverseStmtM
traverseMIPackageItemDecl
(
MIPackageItem
(
Decl
decl
))
=
traverseDeclM
decl
>>=
return
.
MIPackageItem
.
Decl
traverseMIPackageItemDecl
other
=
return
other
-- convert a basic mapper with an initial argument to a stateful mapper
stately
::
(
Eq
s
,
Show
s
)
=>
(
s
->
Mapper
a
)
->
MapperM
(
State
s
)
a
stately
mapper
thing
=
do
s
<-
get
return
$
mapper
s
thing
-- In many conversions, we want to resolve items locally first, and then fall
-- back to looking at other source files, if necessary. This helper captures
-- this behavior, allowing a conversion to fall back to arbitrary global
...
...
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