
#14042: Datatypes cannot use a type family in their return kind -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.0.1 checker) | Keywords: TypeInType, Resolution: | TypeFamilies 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 goldfire): I thought of the same problem (comment:10) afterward, too. But regardless, we could require that the ending kind is `Type` at all usage sites, instead of at the definition site. Indeed, I wonder if we can just omit the check entirely, as long as we check the types of data constructors. Those types end in `-> T blah blah blah`, so if `T blah blah blah`'s kind is other than `Type`, the data constructor type will fail to kind-check. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14042#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler