Non-backward compatible scoping-change for associated types in GHC-7.4
In GHC 7.4.0.20111218 I just noticed, that the scoping for associated types has changed. As I'm not sure whether this is a regression or was changed on purpose (couldn't find any mention of it in the current release notes), I've filed this as a bug for the mean time...
{-# LANGUAGE TypeFamilies #-}
module ModB where
class Foo a where
type FooType
{-# LANGUAGE TypeFamilies #-}
module ModA where
import qualified ModB
-- works only with GHC-7.4
-- error in GHC 7.2: "Not in scope: type constructor or class `FooType'"
instance ModB.Foo Int where
type FooType = Int
-- works with GHC-7.0 and GHC-7.2, but NOT with GHC-7.4
-- error in GHC-7.4: "Qualified name in binding position: ModB.FooType"
instance ModB.Foo Char where
type ModB.FooType = Char
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |