-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Allow to import type and predicate aliases qualified #2481
Comments
Hi @facundominguez, I came across this issue while exploring Qualified Aliases in Liquid Haskell for GSoC 2025. I noticed that it has been open since February 4, 2025. Is there any specific direction or existing work related to this? I’d love to understand its scope and potential challenges before considering it for my GSoC proposal. I am very interested in this project and have recently started learning Haskell. While I may not be highly experienced yet, I am committed to learning and contributing as much as possible. Even if I don’t get selected for GSoC, I intend to put in my best effort to contribute meaningfully. Looking forward to your insights! Best regards, |
Hello @f-ei8ht, and welcome! One way to approach LH could be by building it and then trying it on some examples that involve type and predicate aliases. After growing the sense of how to test the feature, one could move to explore how it is implemented. The documentation of compiler plugins is a prerequisite to approach the code, as Liquid Haskell is implemented as a compiler plugin which has this entry point. For the part of the implementation specific to this ticket, this is were name resolution is implemented. Also, there is this blog post about name resolution in LH, and #2169 can provide some more details. One useful check to decide if someone is ready for design is describing in some detail how the current implementation of name resolution works for aliases both when defined in the current module and when imported from elsewhere. I expect that a fair amount of reading the code will still be necessary. From then on, I guess that a design discussion could be started :) |
Thank you sir, this is a very solid approach, I’ll go through the compiler plugin documentation and the name resolution code as well. I’ll also check out the blog post and #2169 for more context. Once I have a clear understanding of how things work, I’ll reach out! Thank you, again. |
One of the candidates to GSoC noted that predicate aliases are mentioned as deprecated in this section of the documentation, which brings up the question on whether they should be phased out instead of fixed in the same way as type aliases. I think it would be fine to analyze the matter as part of the project. |
This is a spin off of #2169.
Liquid Haskell allows to express type and predicate aliases. For instance,
Unfortunately, aliases live in a flat namespace, which implies that if different modules define the same aliases, they will result in ambiguity.
Ideally, Liquid Haskell would honor the module aliases of import declarations. So in the above example, we can write instead
Besides making name resolution of aliases consistent with the rest of the Liquid Haskell constructs, this would also fix #2446.
The text was updated successfully, but these errors were encountered: