Generating fresh names in a source plugin
Wolfgang Jeltsch
wolfgang at well-typed.com
Sat Aug 2 13:16:23 UTC 2025
[Since it seems that `glasgow-haskell-users at haskell.org` is essentially
an announcements-only mailing list these days, I’m re-sending my recent
e-mail to that mailing list here.]
Hello!
I want to generate AST fragments in a source plugin, and for this I need
to generate fresh (local) names. My current approach is to use
`mkSystemName`, but it, like many of the other name-generating
operations, needs a value of type `Unique`. How can I generate such
values? It seems that the `Hsc` monad doesn’t carry a value of type
`UniqueSupply` with it.
All the best,
Wolfgang
More information about the ghc-devs
mailing list