Ticket #7536 (closed bug: fixed)
Panic with TypeFamilies with type synonym instances
Description
The code below brings GHC to panic.
{-# LANGUAGE TypeFamilies, FlexibleInstances #-}
module Bug where
type Node v = Int
class Predicate a where
type Var a
variable :: Var a -> a
instance Predicate (Node v) where
type Var (Node v) = v
variable = undefined
Panic details:
ghc: panic! (the 'impossible' happened)
(GHC version 7.4.2 for i386-unknown-mingw32):
tcTyVarDetails
( v{tv aa3} [tv] :: ghc-prim:GHC.Prim.*{(w) tc 34d} )
Can be reproduced on GHC versions 7.4.2 and 7.6.1.
Possibly, a duplicate of http://hackage.haskell.org/trac/ghc/ticket/7458, but difficult to tell without additional info on the latter.
Change History
Note: See
TracTickets for help on using
tickets.
