Skip to content

Panic "tcTyVarDetails" in GHCi when :forcing a data family instance

I loaded the following code into GHCi:

{-# LANGUAGE GADTs, DataKinds, KindSignatures, TypeFamilies, PolyKinds #-}

data Nat = Zero | Succ Nat
data family Sing (a :: k)
data instance Sing (a :: Nat) where
  SZero :: Sing Zero
  SSucc :: Sing n -> Sing (Succ n)

Then. I run these commands at the prompt:

*Main> let x = SSucc SZero
*Main> :f x

The response is

ghc: panic! (the 'impossible' happened)
  (GHC version 7.7.20121031 for x86_64-apple-darwin):
	tcTyVarDetails
<<details unavailable>>
Trac metadata
Trac field Value
Version 7.6.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information