[GHC] #10141: Kind inference regression in closed type families

GHC ghc-devs at haskell.org
Sun Mar 8 16:31:08 UTC 2015


#10141: Kind inference regression in closed type families
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                   Owner:  goldfire
            Type:  bug               |                  Status:  closed
        Priority:  highest           |               Milestone:  7.10.1
       Component:  Compiler          |                 Version:  7.10.1-rc2
      Resolution:  invalid           |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 In this particular case, given the third equation `G a = a`, I'm pretty
 sure the only possible return kind is `k`, no? But there was that whole
 long discussion about CUSKs that I didn't really follow, so I take it that
 in general a closed type family may have no principal kind.

 I would venture to say though that the error message GHC produces is IMHO
 not that helpful. In this case the fix is clearly to add a CUSK `type
 family G (a :: k) :: k where`; could GHC work out when it is appropriate
 to suggest adding a CUSK?

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


More information about the ghc-tickets mailing list