[GHC] #12249: Template Haskell top level scoping error
GHC
ghc-devs at haskell.org
Fri Jul 1 11:31:59 UTC 2016
#12249: Template Haskell top level scoping error
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
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 simonpj):
> But why do we want this behavior?
Consider the code in the Description. It seems perfectly reasonable to
me; the two quasiquotes both bind 'x' but in each case it's clear what
binds the occurrence of `x` on the RHS of `f1`, `f2`. I'm thinking of
splices that generate a wad of code that needs some auxiliary bindings; we
don't want to have to worry about a clash if we happen to re-use the same
name when generating the auxiliary bindings in a different splice.
For example, `deriving` code. In fact it's this that is causing #12245,
although that code is generated by GHC itself, not by TH, but it's the
same idea.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12249#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list