Default associated type instances not instantiated
I have these modules:
{-# LANGUAGE TypeFamilies #-}
module A where
class C a where
type F a
type F a = [a]
{-# LANGUAGE TypeFamilies #-}
module B where
import A
instance C Int where
type F Int = Double
instance C Bool
When I say ghc A.hs B.hs
, all works just fine. But, if I say ghc A.hs
and then ghc B.hs
, I get this:
B.hs:8:8:
Conflicting family instance declarations:
F Int -- Defined at B.hs:8:8
F a1 -- Defined in ‛B’
For some reason, when GHC reads in default type instances from an interface file, it doesn't instantiate them properly when they get used.
This was tested on 7.7.20131031.
Trac metadata
Trac field | Value |
---|---|
Version | 7.7 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |