#5772: Failed kind inference in class declaration (regression error)
---------------------------------+------------------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: closed
Priority: normal | Component: Compiler (Type checker)
Version: 7.4.1-rc1 | Resolution: invalid
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: GHC rejects valid program
Testcase: | Blockedby:
Blocking: | Related:
---------------------------------+------------------------------------------
Changes (by dreixel):
* status: new => closed
* resolution: => invalid
Comment:
This is not really a regression; 7.2 was too liberal. The Haskell report
specifies that unconstrained type variables should default to kind `*`. So
`Foo` now correctly gets the kind `* -> * -> Constraint`, which means you
cannot later use `a` with kind `* -> *`. If you know that `a` should have
kind `* -> *`, then you should declare `Foo` as:
{{{
class Foo (a :: * -> *) b
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5772#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs