[GHC] #8084: Enabling PolyKinds makes some type errors weird

GHC ghc-devs at haskell.org
Tue Jul 23 00:31:27 CEST 2013


#8084: Enabling PolyKinds makes some type errors weird
--------------------------------------------+------------------------------
        Reporter:  MartijnVanSteenbergen    |            Owner:
            Type:  bug                      |           Status:  new
        Priority:  normal                   |        Milestone:
       Component:  Compiler (Type checker)  |          Version:  7.6.3
      Resolution:                           |         Keywords:
Operating System:  Unknown/Multiple         |     Architecture:
 Type of failure:  None/Unknown             |  Unknown/Multiple
       Test Case:                           |       Difficulty:  Unknown
        Blocking:                           |       Blocked By:
                                            |  Related Tickets:
--------------------------------------------+------------------------------

Comment (by goldfire):

 I think the desired behavior here is up for debate. When I first started
 with `-XPolyKinds`, I thought the messages were strange, too. Now that I
 use it a lot, I find the explicit kind parameters really helpful (except
 in type-level lists!). Perhaps the principled approach would be to omit
 kind applications by default but enable them with a flag like `-fshow-
 explicit-kind-apps`. Seeing the kind applications also helps to teach the
 programmer more of what is going on under the hood. Sometimes, it is
 necessary to be thinking about the implicit kind parameters to make sense
 of a program, particularly with kind-polymorphic type families. For some
 examples where the type families only make sense when thinking about
 explicit kind application, see the discussion for #7939.

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




More information about the ghc-tickets mailing list