[GHC] #5597: Quoting a type in a splice dies with "Evaluated place holder for PostTcKind"

GHC cvs-ghc at haskell.org
Wed Nov 2 05:39:37 CET 2011


#5597: Quoting a type in a splice dies with "Evaluated place holder for
PostTcKind"
---------------------------------+------------------------------------------
    Reporter:  benl              |       Owner:                    
        Type:  bug               |      Status:  new               
    Priority:  normal            |   Component:  Template Haskell  
     Version:  7.3               |    Keywords:                    
    Testcase:                    |   Blockedby:                    
          Os:  Unknown/Multiple  |    Blocking:                    
Architecture:  Unknown/Multiple  |     Failure:  Compile-time crash
---------------------------------+------------------------------------------
 Compiling the following with the current head:
 {{{
 {-# LANGUAGE TemplateHaskell #-}
 $(undefined [t| (Int, Int) |])
 }}}
 {{{
 ghc-stage2: panic! (the 'impossible' happened)
   (GHC version 7.3.20111031 for i386-apple-darwin):
         Evaluated the place holder for a PostTcKind
 }}}

 Note that the 'undefined' isn't the problem. I've just used that as the
 splice function for debugging purposes. Changing the tuple to a single
 `Int` gives the expected result:

 {{{
 {-# LANGUAGE TemplateHaskell #-}
 $(undefined [t| Int |])
 }}}

 {{{
 Main.hs:1:1:
     Exception when trying to run compile-time code:
       Prelude.undefined
       Code: undefined [t| Int |]
 }}}

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



More information about the Glasgow-haskell-bugs mailing list