[GHC] #11145: Template Haskell quotes of data instance GADTs is totally broken

GHC ghc-devs at haskell.org
Sat Mar 5 13:03:36 UTC 2016


#11145: Template Haskell quotes of data instance GADTs is totally broken
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  7.10.2
      Resolution:                    |             Keywords:  GADTs
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 bollmann):

 while this problem persists in `7.10.3`, it is not present in `HEAD`
 (aea1e5db...) anymore. In the latter, the raised error is:

 {{{
 ghc-stage2 Fuggle.hs -XTemplateHaskell -ddump-splices
 [1 of 1] Compiling Fuggle           ( Fuggle.hs, Fuggle.o )
 Fuggle.hs:(9,1)-(10,44): Splicing declarations
     [d| data instance Fuggle Int (Maybe (a_ap6, b_ap7))
           where MkFuggle_ap5 :: Fuggle Int (Maybe Bool) |]
   ======>
     data instance Fuggle Int (Maybe (a_a4RB, b_a4RC))
       where MkFuggle_a4RA :: Fuggle Int (Maybe Bool)

 Fuggle.hs:9:1: error:
     • Data constructor ‘MkFuggle’ returns type ‘Fuggle
                                                  Int (Maybe Bool)’
         instead of an instance of its parent type ‘Fuggle
                                                     Int (Maybe (a_a4RB,
 b_a4RC))’
     • In the definition of data constructor ‘MkFuggle’
       In the data instance declaration for ‘Fuggle’
 }}}

 So it seems to have been fixed (I don't know whether it was Phab:D1465 or
 something else, though)

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


More information about the ghc-tickets mailing list