[GHC] #5618: TH cannot splice patterns in declaration quotes

GHC ghc-devs at haskell.org
Wed Oct 12 16:06:09 UTC 2016


#5618: TH cannot splice patterns in declaration quotes
-------------------------------------+-------------------------------------
        Reporter:  Lennart           |                Owner:
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  7.2.1
      Resolution:  invalid           |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by heisenbug):

 It seems to work in GHC v8.2.x:
 {{{#!haskell
 Prelude Language.Haskell.TH> runQ ((\p -> [d| $(p) = 1 |] ) [p| hhh|]) >>=
 print
 [ValD (VarP hhh_1) (NormalB (LitE (IntegerL 1))) []]
 }}}

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


More information about the ghc-tickets mailing list