[GHC] #8500: Default associated type instances not instantiated
#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
#8500: Default associated type instances not instantiated -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by simonpj): Good point. I'm on it. Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8500#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8500: Default associated type instances not instantiated -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"6f331d69e50f13626b65ab76de408a49caebd4f6/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="6f331d69e50f13626b65ab76de408a49caebd4f6" Fix marshalling of IfaceAt to and from interface files I had forgotten about Note [CoAxBranch type variables] in CoAxiom This patch fixes Trac #8500 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8500#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8500: Default associated type instances not instantiated -------------------------------------+------------------------------------ Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"d4da5f8e222f7271e84dfb89d84099503df41467/testsuite"]: {{{ #!CommitTicketReference repository="testsuite" revision="d4da5f8e222f7271e84dfb89d84099503df41467" Test Trac #8500 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8500#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8500: Default associated type instances not instantiated -------------------------------------------------+------------------------- Reporter: goldfire | Owner: Type: bug | Status: Priority: normal | closed Component: Compiler | Milestone: Resolution: fixed | Version: 7.7 Operating System: Unknown/Multiple | Keywords: Type of failure: None/Unknown | Architecture: Test Case: | Unknown/Multiple indexed_types/should_compile/T8500 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by simonpj): * status: new => closed * testcase: => indexed_types/should_compile/T8500 * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8500#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC