GeneralizedNewtypeDeriving + MultiParamTypeClasses sends typechecker into an infinite loop
This worked in GHC 7.6.3, but ever since GHC 7.8, this code will cause the typechecker to loop infinitely:
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Bug where
class C a b | a -> b where
c :: a -> Int
newtype Foo a = Foo a
deriving (C b)
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |