[GHC] #10945: Typed Template Haskell splices broken in HEAD (7.11)

GHC ghc-devs at haskell.org
Thu Oct 8 09:09:36 UTC 2015


#10945: Typed Template Haskell splices broken in HEAD (7.11)
-------------------------------------+-------------------------------------
           Reporter:  jstolarek      |             Owner:
               Type:  bug            |            Status:  new
           Priority:  high           |         Milestone:  8.0.1
          Component:  Template       |           Version:  7.11
  Haskell                            |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |
-------------------------------------+-------------------------------------
 In the latest HEAD (e2b579e8d77357e8b36f57d15daead101586ac8e) when I say:

 {{{#!hs
 $$(return [
    SigD (mkName "m")
         (ForallT [PlainTV (mkName "a")]
                  []
                  (AppT (AppT ArrowT (VarT (mkName "a"))) (VarT (mkName
 "a"))))
  , FunD (mkName "m")
         [Clause [VarP (mkName "x")] (NormalB (VarE (mkName "x"))) []]
  ])
 }}}
 I get:
 {{{
 ghc-stage2: panic! (the 'impossible' happened)
   (GHC version 7.11.20151007 for x86_64-unknown-linux):
         runRnSplice
   $$(return
        [SigD
           (mkName "m")
           (ForallT
              [PlainTV (mkName "a")]
              []
              (AppT (AppT ArrowT (VarT (mkName "a"))) (VarT (mkName
 "a")))),
         FunD
           (mkName "m")
           [Clause [VarP (mkName "x")] (NormalB (VarE (mkName "x"))) []]])
 }}}
 This code compiles correctly in GHC 7.10.1.

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


More information about the ghc-tickets mailing list