[GHC] #7939: RHS of associated type not kind-checked
GHC
ghc-devs at haskell.org
Tue Jun 25 00:43:03 CEST 2013
#7939: RHS of associated type not kind-checked
------------------------------------------+---------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: GHC accepts invalid program | Difficulty: Unknown
Testcase: ghci/scripts/T7939 | Blockedby:
Blocking: | Related:
------------------------------------------+---------------------------------
Comment(by goldfire):
I tend to agree that generalizing the result kind (without an explicit
annotation) is a step too far. In general, I'm happy with the current
story that type family arguments and results default to {{{*}}}. Because
instances aren't provided at the same place as the family declaration, any
sort of kind inference amounts to some level of spooky action at a
distance. Note that the kind inference for datatypes looks only at the
declaration of the constructors, not any uses of the type. Similarly, the
kind inference for classes only looks at the methods/other members of the
class, not any instances. For consistency with those cases, I would expect
for type families either (everything defaults to {{{*}}}) or (everything
defaults to fresh kind variables). The former gives better errors in the
common case, so I favor that one.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7939#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list