id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
5802	GHC Panic with PolyKinds and TypeFamilies	dominiquedevriese		"The following crashes:

{{{
  {-# LANGUAGE TypeOperators, PolyKinds, TypeFamilies, ExplicitForAll, GADTs #-}

  module GHCBug where

  data Nat = Zero | Succ Nat

  data NatV (a :: Nat) where
    ZeroV :: NatV Zero
    SuccV :: NatV n -> NatV (Succ n)

  data Phantom t = Whoo

  data ListV (a :: [*]) where
    NilV :: ListV '[]
    (:::) :: Phantom a -> ListV as -> ListV (a ': as)

  type family (:+:) (a :: Nat) (b :: Nat) :: Nat
  type instance Zero :+: b = b
  type instance (Succ a) :+: b = Succ (a :+: b)

  type family TReplicate (n :: Nat) (t :: *) :: [*]
  type instance TReplicate Zero t = '[]
  type instance TReplicate (Succ n) t = t ': TReplicate n t

  replicateTList :: forall (n :: Nat). forall t.
		    NatV n -> Phantom t -> ListV (TReplicate n t)
  replicateTList ZeroV _ = NilV
  replicateTList (SuccV n) t = t ::: replicateTList n t
}}}

Potentially related to 5717 and 5768, although those two seem to be related to ScopedTypeVariables? They also seem to have a different panic message, although maybe this is because I'm using a debug-built GHC?

I'm not actually using 7.4.1-rc1, but 7.4 HEAD at the time of this writing.
"	bug	closed	normal		Compiler (Type checker)	7.4.1-rc1	fixed	PolyKinds		Unknown/Multiple	Unknown/Multiple	Compile-time crash	Unknown				5768, 5717
