[GHC] #6089: Allow declaration splices inside declaration brackets

GHC ghc-devs at haskell.org
Mon Jan 20 21:51:34 UTC 2014


#6089: Allow declaration splices inside declaration brackets
----------------------------------------------+----------------------------
        Reporter:  igloo                      |            Owner:  simonpj
            Type:  feature request            |           Status:  new
        Priority:  normal                     |        Milestone:  7.8.1
       Component:  Template Haskell           |          Version:  7.4.1
      Resolution:                             |         Keywords:
Operating System:  Unknown/Multiple           |     Architecture:
 Type of failure:  GHC rejects valid program  |  Unknown/Multiple
       Test Case:                             |       Difficulty:  Unknown
        Blocking:                             |       Blocked By:
                                              |  Related Tickets:
----------------------------------------------+----------------------------

Comment (by monoidal):

 With

 {{{
 decs :: Q [Dec]
 decs = [d|$( [d| fun3 = undefined |] ) |]
 }}}

 GHC 7.6 complains, but GHC 7.7 apparently ignores the splice - `$decs`
 does not bring `fun3` into scope.

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


More information about the ghc-tickets mailing list