[GHC] #10524: PolyKinds doesn't interact well with DeriveFunctor

GHC ghc-devs at haskell.org
Tue Jun 16 20:43:47 UTC 2015


#10524: PolyKinds doesn't interact well with DeriveFunctor
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 It appears that since {{{f :: k -> *}}} and {{{g :: * -> k}}} in 7.10's
 {{{Functor}}} instance, and since the kind of {{{Compose}}} is {{{(k -> *)
 -> (k1 -> k) -> k1 -> *}}}, it would follow that {{{Compose f g}}} is of
 kind {{{* -> *}}} (unless I'm reading that wrong).

 I raised this issue since at the moment, 7.10 can handle certain poly-
 kinded derived {{{Functor}}} instances (e.g., {{{newtype Alt f a = Alt (f
 a) deriving Functor}}}), but throwing more than one poly-kinded type
 constructor into the mix causes things to go haywire.

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


More information about the ghc-tickets mailing list