Skip to content

standalone deriving for typeable fails

import Data.Typeable

data D a = C1 a | C2 (D a)
deriving instance Typeable a => Typeable (D a)
--           deriving Typeable

x = show $ typeOf (undefined::D Int)

main = print x

yields:

[1 of 1] Compiling Main             ( T.hs, T.o )
ghc-6.8.1: panic! (the 'impossible' happened)
  (GHC version 6.8.1 for i386-unknown-linux):
        No match in record selector Var.tcTyVarDetails
Trac metadata
Trac field Value
Version 6.8.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information