Skip to content

GHC 7.10.1 panic due to wildcard in data family instance

The following simple program causes GHC 7.10.1 (for x86_64-apple-darwin) to panic (rnHsTyKi HsWildcardTy):

 {-# LANGUAGE TypeFamilies, GADTs, DataKinds, PolyKinds #-}
    
data MyKind = A | B

data family Sing (a :: k)

data instance Sing (_ :: MyKind) where
    SingA :: Sing A
    SingB :: Sing B

Because data family instances must be fully saturated, we must give some name to the parameter; but because our instance is a GADT, the name of that parameter is meaningless, so using the wildcard makes complete sense here.

Trac metadata
Trac field Value
Version 7.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
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