[GHC] #10382: Template Haskell quotes should work with stage 1 compiler

GHC ghc-devs at haskell.org
Tue May 5 09:21:45 UTC 2015


#10382: Template Haskell quotes should work with stage 1 compiler
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                   Owner:  ezyang
            Type:  feature request   |                  Status:  new
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Template Haskell  |                 Version:  7.11
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:  Phab:D876
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I'm not sure about this.

 Minor point: we already have a language extension `Opt_QuasiQuotes`.
 Surely we don't need another!

 Medium point: this change really only relates to building GHC ''itself'',
 so it's fairly parochial.  For example if we have `[qq| blah |]` in GHC
 itself, then to compile stage 2 we must have `qq` defined in some library
 that is compiled with stage 1; a boot library in other words.  And the
 boot libraries are fairly limited.

 Main thing: It does add complexity.  If you write `[qq| blah |]` then:
  * In stage 1 we must find and dynamically link function `qq`, against the
 bootstrap compiler
  * In stage 2 we must find and dynamically link function `qq`, against the
 stage 1 compiler
 Moreover, if `HsSyn` has changed, then function `qq` must change too.

 And if you can manage all this version skew stuff, what's to stop us
 allowing ''all'' Template Haskell splices in stage 1?  I thought it was
 obvious, but now I can't quite see it!

 Simon

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10382#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list