[GHC] #4372: Extending quasiquotation support
GHC
cvs-ghc at haskell.org
Thu Oct 7 11:36:36 EDT 2010
#4372: Extending quasiquotation support
---------------------------------+------------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Template Haskell | Version: 6.12.3
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by simonpj):
It's also worth reminding ourselves that quasi-quote syntax is only
shorthand for a TH splice. Thus
{{{
[pads| <blah> |]
}}}
means
{{{
$(quoteExp pads "<blah>")
}}}
So in the case proposed by Gershom you could say
{{{
$(quoteExp (jmt [jsModuleSig]) "<blah>")
}}}
and away you go. Is that so bad?
At the moment you can't do TH splices in patterns or local declarations,
whereas you can use quasi-quotes. I have separate plans to change that
(need time to write up), but let's assume for the sake of argument that
patterns can be done the same way as expressions.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4372#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list