[GHC] #10760: Conflicting typefamily instances not reported with polykinds
GHC
ghc-devs at haskell.org
Sat Aug 8 18:33:42 UTC 2015
#10760: Conflicting typefamily instances not reported with polykinds
-------------------------------------+-------------------------------------
Reporter: steely | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Resolution: invalid | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC accepts | Unknown/Multiple
invalid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by goldfire):
* status: new => closed
* resolution: => invalid
Comment:
This is correct behavior. All kind variables in a type family are always
inputs. This is admittedly counter-intuitive when the kind variable
classifies the result. If we write kinds explicitly, your example becomes
this:
{{{
type family Bar k (a :: *) :: k
type instance Bar * Int = Int
type instance Bar (* -> *) Int = []
}}}
If you have a concrete suggestion of how to improve the manual in this
regard, we'd love to have it.
Thanks for reporting!
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10760#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list