
#13054: Generating unique names with template haskell -------------------------------------+------------------------------------- Reporter: tim-m89 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): I'm very confused here. I think this is much simpler than we're making it out to be. `newName` is a facility for creating a name distinct from all others. As I've always understood it, the parameter given to `newName` is simply a hint, so that printing out the names are legible to a human. It should ''not'' be an integral part of its behavior. A corollary of the above definition is that it should be impossible to write the result of a `newName` outside of TH. Thus comment:9 is a non- issue. As it turns out, the renamer doesn't always respect the opaqueness of `newName`s (for example, in fixity declarations). This should be fixed. Perhaps there are other bugs, too. But when all is well, `newName` should work fine for local and top-level definitions. You naturally can't export `newName`s, because you can't write them in an export list. (And we would make sure they're not exported if there is no export list.) And, I think, that's it. Is there something I'm missing? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13054#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler