[GHC] #6137: Different behaviour between a GADT and a data family with regards to kind unification

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


#6137: Different behaviour between a GADT and a data family with regards to kind
unification
------------------------------+---------------------------------------------
 Reporter:  dreixel           |          Owner:                         
     Type:  bug               |         Status:  new                    
 Priority:  normal            |      Component:  Compiler (Type checker)
  Version:  7.5               |       Keywords:  PolyKinds              
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple       
  Failure:  None/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/6137#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list