
#10114: Kind mismatches with AnyK in rank-2 types -------------------------------------+------------------------------------- Reporter: cam | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 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 goldfire): I'm not sure I understand comment:3. What are you worried about? I will also say that it's possible the right answer is {{{ type T = forall k1. (f :: k1 -> *) (a :: k1). f a }}} so that `T :: *`. My understanding is that it's generally more common to restrict the body of a forall to have kind `*`. GHC doesn't do this, but all the papers about System FC do. In other work, I changed the typing rule for forall accordingly, and something broke horribly (eta-reducing newtypes, maybe?), but perhaps we don't have to infer a type that has a non-`*` kind as the body of a forall. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10114#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler