refactor: move coq scopes to own module#10181
Merged
Conversation
Signed-off-by: Rudi Grinberg <me@rgrinberg.com> <!-- ps-id: f5790361-1f4e-49a4-95aa-47a5a7eb238b -->
3980d7d to
c04cccb
Compare
Alizter
reviewed
Mar 3, 2024
| { project : Dune_project.t | ||
| ; db : Lib.DB.t | ||
| ; coq_db : Coq_lib.DB.t Memo.Lazy.t | ||
| ; coq_db : Coq_lib.DB.t Memo.t |
Collaborator
There was a problem hiding this comment.
Since this is no longer lazy, wouldn't this mean that we construct the coq_db even if it is not being used?
Member
Author
There was a problem hiding this comment.
It's still lazy. This Memo.t is just forcing the cell constructed in Coq_scope.t
Member
Author
There was a problem hiding this comment.
The work that is no longer saved is the map lookup in the scope database. However such a map lookup has less overhead than memo's machinery so there's no issue.
Collaborator
|
Lazy handling was indeed pretty subtle on the original code, I'll review the changes ASAP |
Member
Author
|
I'm going to merge this as this is getting in the way of making further improvements to Scope. Please review at your own convenience. |
This file contains hidden or 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
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.
cc @ejgallego and @Alizter . I need to refactor OCaml scope handling in dune and it would be helpful to have the coq stuff live on its own. No semantic changes here, but I did remove some intermediate lazy cells whose purpose I did not see.