Panic with zonkQuantifiedTyVar in GHC 7.6.1
In GHC 7.6.1, the following code:
{-# LANGUAGE TypeFamilies, GADTs, FlexibleContexts, MultiParamTypeClasses #-}
type family T :: * -> *
data E :: * -> * where
E :: C p => T (T p) -> E p
class C' b a where c :: T b -> a
class C' (T a) a => C a
-- f :: C' (T p) a => E p -> a
f (E d) = c d
produces the following error message:
[1 of 1] Compiling Main ( Test.hs, interpreted )
ghc: panic! (the 'impossible' happened)
(GHC version 7.6.1 for i386-apple-darwin):
zonkQuantifiedTyVar
<<details unavailable>>
Uncommented the type signature allows it to compile.
The code above does not panic in HEAD, so I guess it's fixed. But I thought it would be good to report it anyway.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | leather@cs.uu.nl |
| Operating system | |
| Architecture |