[GHC] #14645: Allow type family in data family return kind

GHC ghc-devs at haskell.org
Sun Jan 7 21:25:27 UTC 2018


#14645: Allow type family in data family return kind
-------------------------------------+-------------------------------------
           Reporter:  goldfire       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.4.1-alpha1
           Keywords:  TypeInType,    |  Operating System:  Unknown/Multiple
  TypeFamilies                       |
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 GHC currently allows

 {{{#!hs
 data family DF1 :: k1 -> k2
 }}}

 where it's expected (and checked) that all data ''instances'' have a
 return kind of `Type`. (Perhaps `k2` expands to `Type -> Type`, for
 example.)

 However, it rejects

 {{{#!hs
 type family TF (x :: Type) :: Type
 data family DF2 :: x -> TF x
 }}}

 when that's clearly just as sensible as the first definition.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14645>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list