Qualified name required when defining type family instance in instance declaration
With these two modules, GHC gives the following error:
Bar.hs:3:30: Not in scope: type constructor or class `T'
I have to use Foo.T in the instance definition. This is inconsistent with method definitions which must use unqualified names.
module Foo where
class C a where type T a
module Bar where
import qualified Foo
instance Foo.C Int where type T Int = Int
Trac metadata
Trac field | Value |
---|---|
Version | 6.9 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Unknown |
Architecture | Unknown |