
#7939: RHS of associated type not kind-checked ------------------------------------------+--------------------------------- Reporter: goldfire | Owner: goldfire 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): This, too, is fine. `F` does have kind `k`, but it will only be a synonym to `Maybe` in contexts that expect a type of kind `* -> *`: {{{ Prelude> type family F :: k where F = Maybe Prelude> :kind! F F :: k = forall (k :: BOX). F k Prelude> :kind! F Int F Int :: k = forall (k :: BOX). F (* -> k) Int Prelude> :kind! (F Int :: *) (F Int :: *) :: * = Maybe Int }}} So, I do think that beasts like `F` are strange, but I think (hope?) that a programmer is unlikely to stumble upon an `F` without knowing what they are doing. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7939#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler