Skip to content

Panic "ctEvTerm" when using functional dependencies and PolyKinds

The following code causes a panic:

{-# LANGUAGE FunctionalDependencies, PolyKinds #-}

class Baz a b | a -> b where
  bar :: a -> ()

instance Baz Bool Bool where
  bar _ = ()

foo = bar False

The panic reads:

ghc: panic! (the 'impossible' happened)
  (GHC version 7.7.20121031 for x86_64-apple-darwin):
	ctEvTerm: derived constraint cannot have id
<<details unavailable>>

The panic does not happen without -XPolyKinds.

Trac metadata
Trac field Value
Version 7.7
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