[GHC] #6049: Kind variable generalization error in GADTs

GHC cvs-ghc at haskell.org
Thu Jun 7 15:09:49 CEST 2012


#6049: Kind variable generalization error in GADTs
----------------------------------------+-----------------------------------
    Reporter:  goldfire                 |       Owner:                           
        Type:  bug                      |      Status:  new                      
    Priority:  normal                   |   Milestone:                           
   Component:  Compiler (Type checker)  |     Version:  7.5                      
    Keywords:  PolyKinds                |          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 <simonpj at 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/6049#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list