[GHC] #12500: Open Type Family Kind Resolution

#12500: Open Type Family Kind Resolution -------------------------------------+------------------------------------- Reporter: andrewthad | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC rejects Unknown/Multiple | valid program Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The following is a minimal example of this problem: {{{#!hs -- Section 1 data Animal = Dog | Cat | Mouse data Planet = Earth | Jupiter | Mars | Saturn type family ToRes (k :: Type) = (j :: Type) type instance ToRes Planet = Animal -- Section 2 type family Thing k (a :: k) = (b :: ToRes k) type instance Thing Planet 'Earth = 'Dog }}} The last line fails with: {{{ Expected kind 'ToRes Planet', but 'Dog has kind Animal }}} What's weird is that, if I take the part labeled Section 1 and move it into another module and then import that module into one that contains Section 2, it compiles fine. In this minimal case, that's not a huge problem, but for my real use case, splitting the type instances into two modules like this forces me to use an orphan. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12500 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12500: Open Type Family Kind Resolution -------------------------------------+------------------------------------- Reporter: andrewthad | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * status: new => closed * resolution: => duplicate Comment: This is a duplicate of #11348. Fixed in HEAD. Thanks for reporting! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12500#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12500: Open Type Family Kind Resolution -------------------------------------+------------------------------------- Reporter: andrewthad | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by andrewthad): Glad to know that it's already been addressed. Thanks for letting me know! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12500#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC