
#13608: Expose the type of quasiquotes -------------------------------------+------------------------------------- Reporter: | Owner: facundo.dominguez | facundo.dominguez Type: bug | Status: patch Priority: normal | Milestone: Component: Template Haskell | Version: 8.0.1 Resolution: | Keywords: QuasiQuotes Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: 12778 | Differential Rev(s): Phab:D3610 Wiki Page: | -------------------------------------+------------------------------------- Comment (by facundo.dominguez): Here's a more general approach that relies on plugins. {{{ addCorePlugin :: GhcPlugins.Plugin -> Q () }}} This arranges for a plugin to be inserted in the core2core passes. It saves the user the trouble of adding it at the top of the module: {{{ {-# OPTIONS_GHC -fplugin=... #-} }}} The plugin can find the result of quasiquotations by making a pass over the module looking for some special function inserted by the quasiquoter for that sake. I have observed that GHC does not link the GHC api into the final executable when using plugins, I would hope that it doesn't do it either if we add it this way. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13608#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler