
#11584: [Template Haskell] Language.Haskell.TH.Syntax.hs contains misleading comment -------------------------------------+------------------------------------- Reporter: bollmann | Owner: bollmann Type: bug | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: Documentation | Unknown/Multiple bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bollmann): @rwbarton: interesting. Thanks for clarifying the true nature of this comment! I sadly hadn't run the generated splice `g "1" "2"` as you then suggested, but had found the comment misleading solely based on enabling the `-ddump- splices` flag. When enabled, the splice in your program expands to something like: {{{ \ x -> \ x_a3uK -> x }}} And thus I thought, that the comment of `newName` capturing `mkName`s didn't make sense at all, since the generated splice agrees with the specified TH AST. Hence, it seems that the splice expansion displayed by `-ddump-splices` does not agree with what is actually generated when running the code `g "1" "2"`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11584#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler