[GHC] #4372: Extending quasiquotation support
GHC
cvs-ghc at haskell.org
Wed Oct 6 06:48:33 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 gershomb):
Here's an attempt to better explain the use case.
{{{
jmt :: [ModuleSig] -> QuasiQuoter
-- file 1:
(jsModule,jsModuleSig) = [$jmt []| ... jscode ... |]
-- jsModule is statically typechecked by the jmt quasiquoter
-- file 2:
(jsModule2,jsModuleSig2) = [$jmt [jsModuleSig]| ... jscode ... |]
-- jsModule2 is statically typechecked by the jmt quasiquoter, with the
types from jsModule already brought into scope.
-- That is to say, the list of module signatures acts as a set of import
statements.
}}}
In general, any time a quasiquoter needs to be parameterized by a
potentially complex value then this should prove useful
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4372#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list