-
Notifications
You must be signed in to change notification settings - Fork 0
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
Generate names directly? #12
Comments
I forgot to mention that I made this issue because of #11 (comment) and more specifically https://gitlab.haskell.org/ghc/ghc/-/issues/21730#note_436908. |
I know how to do the scaffolding/refactoring part of this, but I'm not sure how to generate an
So really I just need something of type |
I'm closing this as "not planned" for the reasons I outlined in #14. However if someone comes along and thinks this sounds interesting, I'm open to a PR. |
Currently Imp works by inserting
import
statements. However in theory it is possible for it to modify identifiers in place, changing them fromQual
toExact
: https://hackage.haskell.org/package/ghc-9.8.2/docs/GHC-Types-Name-Reader.html#t:RdrNameI'm not sure how difficult this would be to pull off. An
Exact
is just a wrapper around aName
, and generating aName
requires aUnique
. That should be possible with the name cache in the HSC env: https://hackage.haskell.org/package/ghc-9.8.2/docs/GHC-Driver-Env-Types.html#t:HscEnvI'm also not sure if this would be "better" in any meaningful way or just different.
The text was updated successfully, but these errors were encountered: