-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix: modules associated with inductive types should be declared after their inductive types #2768
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
lukaszcz
commented
May 7, 2024
•
edited
edited
- Closes Internal-to-Core translation is limited to type-declaring axioms #2763.
- Fixes a bug in the scoper, likely introduced in Per-module compilation #2468 by making later declarations depend on earlier ones. The problem was that the inductive modules were always added at the beginning of a section, which resulted in an incorrect definition dependency graph (an inductive type depended on its associated projections).
- Now inductive modules are added just after a group of inductive definitions, before the next function definition. This implies that inductive type definitions which depend on each other cannot be separated by function definitions. Existing Juvix code needs to be adjusted.
- The behaviour is now equivalent to "manually" inserting module declarations with projections after each group of inductive definitions.
lukaszcz
force-pushed
the
bugfix-internal-to-core-axioms
branch
from
May 8, 2024 14:19
8359160
to
145dc31
Compare
lukaszcz
force-pushed
the
bugfix-internal-to-core-axioms
branch
2 times, most recently
from
May 14, 2024 07:53
87f82d1
to
daf68f0
Compare
janmasrovira
force-pushed
the
bugfix-internal-to-core-axioms
branch
from
May 14, 2024 08:53
daf68f0
to
bb46fb1
Compare
src/Juvix/Compiler/Concrete/Translation/FromParsed/Analysis/Scoping.hs
Outdated
Show resolved
Hide resolved
src/Juvix/Compiler/Concrete/Translation/FromParsed/Analysis/Scoping.hs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I struggled to understand what was happening only by looking at the code. I think that adding some comments will be helpful
lukaszcz
force-pushed
the
bugfix-internal-to-core-axioms
branch
from
May 14, 2024 15:48
9166444
to
0143476
Compare
Okay, I added some comments |
janmasrovira
approved these changes
May 14, 2024
…oping.hs Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
…oping.hs Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
paulcadman
force-pushed
the
bugfix-internal-to-core-axioms
branch
from
May 14, 2024 16:46
2077e99
to
76e10fa
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.