
For non-CUSKs, we can safely simply make T :: kappa, without looking at
#15142: GHC HEAD regression: tcTyVarDetails -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: new Priority: highest | Milestone: 8.6.1 Component: Compiler (Type | Version: 8.5 checker) | Keywords: TypeInType, Resolution: | TypeFamilies, CUSKs Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): the declaration at all! Actually this is not true, as things stand. This accepted: {{{ data T k (a::k) = MkT (Proxy (T * Int)) (Proxy (T (*->*) Maybe)) }}} But `T` does not have a CUSK, and if we assigned it the mono-kind `kappa`, the recursive definition would be rejected. So currently we are cleverly (and somewhat accidentally) accepting a recursive definition with a partial kind signature. I think we should just reject this definition unless you write a CUSK. Specifying exactly what is and what is not accepted would be ... difficult. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15142#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler