Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LARA
inox
Commits
03a84ffc
Commit
03a84ffc
authored
10 years ago
by
Emmanouil (Manos) Koukoutos
Browse files
Options
Downloads
Patches
Plain Diff
Imports show to fresh Modules after RestoreMethods
parent
7c34f26f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/scala/leon/purescala/RestoreMethods.scala
+6
-2
6 additions, 2 deletions
src/main/scala/leon/purescala/RestoreMethods.scala
with
6 additions
and
2 deletions
src/main/scala/leon/purescala/RestoreMethods.scala
+
6
−
2
View file @
03a84ffc
...
@@ -120,12 +120,16 @@ object RestoreMethods extends TransformationPhase {
...
@@ -120,12 +120,16 @@ object RestoreMethods extends TransformationPhase {
}
}
m
.
copy
(
defs
=
m
.
definedClasses
++
newFuns
).
copiedFrom
(
m
)
m
.
copy
(
defs
=
m
.
definedClasses
++
newFuns
).
copiedFrom
(
m
)
}
}
val
modsToMods
=
(
for
{
u
<-
p
.
units
;
m
<-
u
.
modules
}
yield
(
m
,
refreshModule
(
m
))
).
toMap
p
.
copy
(
units
=
p
.
units
map
{
u
=>
u
.
copy
(
p
.
copy
(
units
=
p
.
units
map
{
u
=>
u
.
copy
(
modules
=
u
.
modules
map
refreshModule
,
modules
=
u
.
modules
map
modsToMods
,
imports
=
u
.
imports
flatMap
{
imports
=
u
.
imports
flatMap
{
// Don't include imports for functions that became methods
// Don't include imports for functions that became methods
case
WildcardImport
(
fd
:
FunDef
)
if
oldFuns
contains
fd
=>
None
case
SingleImport
(
fd
:
FunDef
)
if
oldFuns
contains
fd
=>
None
case
SingleImport
(
m
:
ModuleDef
)
=>
Some
(
SingleImport
(
modsToMods
(
m
)))
case
WildcardImport
(
m
:
ModuleDef
)
=>
Some
(
WildcardImport
(
modsToMods
(
m
)))
case
other
=>
Some
(
other
)
case
other
=>
Some
(
other
)
}
}
)})
)})
...
...
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