-
Notifications
You must be signed in to change notification settings - Fork 20
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
Handle cyclic module dependencies #935
Conversation
…modules dependency graph.
… find late_skip attributes.
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.
As we discussed, we should rename constructors in enumeration when their name are clashing, see https://hax-playground.cryspen.com/#fstar/0559a9e0ba/gist=02128b3051501d2c361787c887a82d26
As discussed, it is easier (and maybe better as we keep the naming convention) to always rename the variants when we rename the enum. We also need to include the new variants in the module of origin with an alias (to make sure the original name is available). I implemented that. Note that the import of variants also happens when there is no renaming (not sure if it is good or not). |
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.
Thanks, that's great!
Let's merge it! 😃
Closes #396
The idea is to put together objects that create a cyclic dependency at the module level. We bundle them in a newly created module (one for each cycle) and then use FStarLang/FStar#3369 to selectively include these objects in the module they actually belong to.
List of changes compared to the existing implementation (that was present in
dependencies.ml
but not used by any backend):let
andtype
keywords byand
for mutually recursive itemsunfold let
byinclude
to make use of Add a new syntax to support partialopen
s andinclude
s FStarLang/FStar#3369