Quoting a type in a splice dies with "Evaluated place holder for PostTcKind"
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 |]
Trac metadata
Trac field | Value |
---|---|
Version | 7.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Template Haskell |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |