Created
September 4, 2012 21:28
-
-
Save ti1024/3626747 to your computer and use it in GitHub Desktop.
Panic in GHC 7.4.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
module Test where | |
class C1 p q r | r -> p, r -> q | |
class C2 s | |
class C3 t | |
data Q = Q | |
data S r = S | |
data T1 s = T1 | |
instance C1 p Q r => C2 (S r) | |
instance C2 s => C3 (T1 s) | |
newtype T2 r = T2 (T1 (S r)) | |
deriving instance C1 p Q r => C3 (T2 r) | |
{- | |
GHC 7.4.1 results in a panic: | |
ghc.exe: panic! (the 'impossible' happened) | |
(GHC version 7.4.1 for i386-unknown-mingw32): | |
tcTyVarDetails | |
( p{tv aa4} [tv] :: ghc-prim:GHC.Prim.*{(w) tc 34d} ) | |
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug | |
GHC 7.6.1-rc1 (7.6.0.20120810) compiles it without a problem. | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment