Allow local logical aliases (defines)#2463
Merged
Merged
Conversation
Contributor
Author
Collaborator
There was a problem hiding this comment.
Nice to see this feature in the works.
Import aliases are ignored when resolving defines. This made sense when they were global, but now that they are defined in modules, it would be best to treat them the same as measures or reflected functions.
There are other things to adjust that I mentioned in comments. But if name resolution looks too difficult, I could try contributing some of it, probably in January.
Another thing needed would be some user documentation for the new define annotation.
facundominguez
left a comment
Collaborator
There was a problem hiding this comment.
I wonder if there is any define that needs to stay in CoreToLogic rather than being moved to an existing module.
nikivazou
approved these changes
Jan 9, 2025
facundominguez
approved these changes
Jan 9, 2025
Collaborator
|
Thanks @clayrat! |
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.



This PR adds the ability to define logic aliases with a new
defineannotation outside the built-inLanguage.Haskell.Liquid.GHC.CoreToLogicmodule. The declarations re-use the name resolution machinery, allowing for partial qualification. The local aliases are re-exported to the dependencies.Following this, all useful defines have been moved out of the global
CoreToLogicmap, and the module itself has been removed:GHC.Internal.Base.$GHC.Classes.notGHC.Types.TrueGHC.CString.unpackCString#Language.Haskell.Liquid.ProofCombinators.withProofSetandBagoperationsRealand a localIntegeralias needed intests/pos/NumRefl.hs