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
23d82c62
Commit
23d82c62
authored
Jul 18, 2021
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
paramtype conversion no longer sorts by type
parent
16a13ee9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/Convert/ParamType.hs
+4
-4
No files found.
src/Convert/ParamType.hs
View file @
23d82c62
...
@@ -20,7 +20,7 @@ type TypeMap = Map.Map Identifier Type
...
@@ -20,7 +20,7 @@ type TypeMap = Map.Map Identifier Type
type
Modules
=
Map
.
Map
Identifier
TypeMap
type
Modules
=
Map
.
Map
Identifier
TypeMap
type
Instance
=
Map
.
Map
Identifier
(
Type
,
IdentSet
)
type
Instance
=
Map
.
Map
Identifier
(
Type
,
IdentSet
)
type
Instances
=
Set
.
Set
(
Identifier
,
Instance
)
type
Instances
=
Map
.
Map
String
(
Identifier
,
Instance
)
type
IdentSet
=
Set
.
Set
Identifier
type
IdentSet
=
Set
.
Set
Identifier
type
DeclMap
=
Map
.
Map
Identifier
Decl
type
DeclMap
=
Map
.
Map
Identifier
Decl
...
@@ -34,7 +34,7 @@ convert files =
...
@@ -34,7 +34,7 @@ convert files =
mapM
(
collectDescriptionsM
collectDescriptionM
)
files
mapM
(
collectDescriptionsM
collectDescriptionM
)
files
(
files'
,
instancesRaw
)
=
(
files'
,
instancesRaw
)
=
runWriter
$
mapM
(
mapM
convertDescriptionM
)
files
runWriter
$
mapM
(
mapM
convertDescriptionM
)
files
instances
=
Set
.
toList
instancesRaw
instances
=
Map
.
elems
instancesRaw
-- add type parameter instantiations
-- add type parameter instantiations
files''
=
map
(
concatMap
explodeDescription
)
files'
files''
=
map
(
concatMap
explodeDescription
)
files'
...
@@ -283,8 +283,8 @@ convertModuleItemM (orig @ (Instance m bindings x r p)) =
...
@@ -283,8 +283,8 @@ convertModuleItemM (orig @ (Instance m bindings x r p)) =
if
hasOnlyExprs
then
if
hasOnlyExprs
then
return
orig
return
orig
else
if
not
hasUnresolvedTypes
then
do
else
if
not
hasUnresolvedTypes
then
do
tell
$
Set
.
singleton
(
m
,
resolvedTypes
)
let
m'
=
moduleInstanceName
m
resolvedTypes
let
m'
=
moduleInstanceName
m
resolvedTypes
tell
$
Map
.
singleton
m'
(
m
,
resolvedTypes
)
return
$
Generate
$
map
GenModuleItem
$
return
$
Generate
$
map
GenModuleItem
$
map
(
MIPackageItem
.
Decl
)
addedDecls
++
map
(
MIPackageItem
.
Decl
)
addedDecls
++
[
Instance
m'
(
additionalBindings
++
exprBindings
)
x
r
p
]
[
Instance
m'
(
additionalBindings
++
exprBindings
)
x
r
p
]
...
@@ -292,7 +292,7 @@ convertModuleItemM (orig @ (Instance m bindings x r p)) =
...
@@ -292,7 +292,7 @@ convertModuleItemM (orig @ (Instance m bindings x r p)) =
return
orig
return
orig
else
do
else
do
let
m'
=
TemplateTag
m
let
m'
=
TemplateTag
m
tell
$
Set
.
singleton
(
m
,
Map
.
empty
)
tell
$
Map
.
singleton
m'
(
m
,
Map
.
empty
)
return
$
Instance
m'
bindings
x
r
p
return
$
Instance
m'
bindings
x
r
p
where
where
hasOnlyExprs
=
all
(
isRight
.
snd
)
bindings
hasOnlyExprs
=
all
(
isRight
.
snd
)
bindings
...
...
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