#6093: Kind polymorphism fails with recursive type definition using different 
kind
----------------------------------------+-----------------------------------
    Reporter:  Ashley Yakeley           |       Owner:                          
 
        Type:  bug                      |      Status:  new                     
 
    Priority:  normal                   |   Milestone:                          
 
   Component:  Compiler (Type checker)  |     Version:  7.4.1                   
 
    Keywords:                           |          Os:  Unknown/Multiple        
 
Architecture:  Unknown/Multiple         |     Failure:  GHC rejects valid 
program
  Difficulty:  Unknown                  |    Testcase:                          
 
   Blockedby:                           |    Blocking:                          
 
     Related:                           |  
----------------------------------------+-----------------------------------

Comment(by simonpj@…):

 commit c91172004f2a5a6bf201b418c32c2d640ee34049
 {{{
 Author: Simon Peyton Jones <simo...@microsoft.com>
 Date:   Thu Jun 7 12:09:22 2012 +0100

     Support polymorphic kind recursion

     This is (I hope) the last major patch for kind polymorphism.
     The big new feature is polymorphic kind recursion when you
     supply a complete kind signature for a type constructor.
     (I've documented it in the user manual too.)

     This fixes Trac #6137, #6093, #6049.

     The patch also makes type/data families less polymorphic by default.
        data family T a
     now defaults to T :: * -> *
     If you want T :: forall k. k -> *, use
        data family T (a :: k)

     This defaulting to * is done whenever there is a
     "complete, user-specified kind signature", something that is
     carefully defined in the user manual.

     Hurrah!

  compiler/typecheck/TcBinds.lhs      |    3 +-
  compiler/typecheck/TcClassDcl.lhs   |   49 --------
  compiler/typecheck/TcHsType.lhs     |   50 ++++++--
  compiler/typecheck/TcInstDcls.lhs   |  106 +++++------------
  compiler/typecheck/TcRnDriver.lhs   |   66 ++++++++---
  compiler/typecheck/TcRnTypes.lhs    |   31 ++----
  compiler/typecheck/TcSplice.lhs     |    3 +-
  compiler/typecheck/TcTyClsDecls.lhs |  204
 ++++++++++++++++++-------------
  docs/users_guide/flags.xml          |    5 +-
  docs/users_guide/glasgow_exts.xml   |  228
 ++++++++++++++++++++++-------------
  10 files changed, 400 insertions(+), 345 deletions(-)
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to