[GHC] #9066: Template Haskell cannot splice an infix declaration for a data constructor

GHC ghc-devs at haskell.org
Fri May 2 20:56:26 UTC 2014


#9066: Template Haskell cannot splice an infix declaration for a data constructor
------------------------------------+-------------------------------------
       Reporter:  goldfire          |             Owner:  goldfire
           Type:  bug               |            Status:  new
       Priority:  normal            |         Milestone:
      Component:  Template Haskell  |           Version:  7.8.2
       Keywords:                    |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+-------------------------------------
 When I say

 {{{
 $([d|
   data Blargh = (:<=>) Int Int
   infix 4 :<=>
   |])
 }}}

 I get

 {{{
     Illegal variable name: ‘:<=>’
     When splicing a TH declaration: infix 4 :<=>_0
 }}}

 The code inside the TH quote works when not used with TH.

 I will fix in due course.

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


More information about the ghc-tickets mailing list