
#14042: Misleading error message when type family is used in datatype's 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, newcomer 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 RyanGlScott): Just like type families are rejected in class instances: {{{
:set -XTypeFamilies type family Foo a instance Show (Foo a)
<interactive>:4:10: error: * Illegal type synonym family application in instance: Foo a * In the instance declaration for `Show (Foo a)' }}} I want the error message for type families in data type return kinds to be similarly informative. Something like: {{{
data Foo :: Id Type * Illegal type synonym family application in return kind of data type declaration Id Type }}}
None of this faffery about non-`*` return kinds, since that's not the real issue here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14042#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler