Skip to content
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

Replace default class with implicit classes #4230

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

keyboardDrummer
Copy link
Member

@keyboardDrummer keyboardDrummer commented Jun 30, 2023

Fixes #4139 because it causes declarations in the default module from different included files, to be sorted in topological order of the include graph.

Alternative to: #4139

Changes

  • Instead of each module having a single default class, have each class member in a module be wrapped by an implicit class. This improves the order in which the CLI presents errors by making it follow the order of the source code more closely.

Testing

  • Adapted test expect files to match the improved error message order.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@keyboardDrummer keyboardDrummer changed the title Instead of each module having a single default class, have each class member in a module be surrounded by an implicit class Instead of each module having a single default class, have each class member in a module be wrapped by an implicit class Jun 30, 2023
@keyboardDrummer keyboardDrummer changed the title Instead of each module having a single default class, have each class member in a module be wrapped by an implicit class Replace default class with implicit classes Jun 30, 2023
Copy link
Collaborator

@davidcok davidcok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest that you check that this change in internal structure is OK for dafny doc

@keyboardDrummer
Copy link
Member Author

keyboardDrummer commented Jul 11, 2023

Pausing for now because for code generation, it would be nicest to combine the implicit classes after resolution, but the current compiler architecture makes that difficult to implement because it breaks the references to the implicit classes and they can not easily be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: dafny run not working with include
3 participants