[GHC] #10047: inconsistency in name binding between splice and quasiquotation
GHC
ghc-devs at haskell.org
Thu Jun 4 16:13:08 UTC 2015
#10047: inconsistency in name binding between splice and quasiquotation
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.12.1
Component: Template Haskell | Version: 7.8.4
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case: th/T10047
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by rwbarton):
spinda: indeed, your example hints at a simpler manifestation of the bug;
when `wow` runs in your program, `thing` is not accessible to `reify` (not
in scope), whereas if you'd written a splice with `$(...)`, it would be in
scope.
Sorry to hear that your programs were broken by this fix, but can't you
just move the quasiquotations upward in your file so that they aren't in
the middle of any recursive definition groups (e.g., to the top of the
file)?
I'm pretty sure the main advantage of quasiquoters was supposed to be the
succinct syntax, not an undocumented difference in scoping rules. If
there's a real use case for a type of splice with different scoping, it
doesn't particularly make language design sense to tie that difference to
quasiquotes vs. traditional splices.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10047#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list