
#8500: Default associated type instances not instantiated ------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8500 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler