[GHC] #11584: [Template Haskell] Language.Haskell.TH.Syntax.hs contains misleading comment
GHC
ghc-devs at haskell.org
Wed Feb 17 13:31:52 UTC 2016
#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):
Yea, I thought the comment to be wrong at first glance as well, in
particular since I couldn't observe this capturing behavior at all: The
mentioned splice generates something like
{{{
\ x -> \ x_a3vv -> x
}}}
Which is exactly as specified in the TH AST and thus as expected.
But at 2nd reading I was thinking that the original intent of this comment
might have been to explain that a newly generated Name via `newName` might
clash with the name chosen by `mkName`. That is, suppose `newName` would
generate the name `x_1234` next, and by bad luck we generate the same name
`x_1234` by means of `mkName`. Then these two names might interfere and
capturing results (see my revised message in the ticket description at the
very end for more details).
Or is this case not possible and we should just remove this comment
entirely instead of modifying it?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11584#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list