[GHC] #7939: RHS of associated type not kind-checked

GHC ghc-devs at haskell.org
Fri Jun 28 10:37:04 CEST 2013


#7939: RHS of associated type not kind-checked
------------------------------------------+---------------------------------
  Reporter:  goldfire                     |          Owner:  goldfire        
      Type:  bug                          |         Status:  new             
  Priority:  normal                       |      Milestone:                  
 Component:  Compiler                     |        Version:  7.7             
Resolution:                               |       Keywords:                  
        Os:  Unknown/Multiple             |   Architecture:  Unknown/Multiple
   Failure:  GHC accepts invalid program  |     Difficulty:  Unknown         
  Testcase:  ghci/scripts/T7939           |      Blockedby:                  
  Blocking:                               |        Related:                  
------------------------------------------+---------------------------------

Comment(by eir@…):

 commit 8c5e7346746a870ccc2eb86747792700f2a08deb
 {{{
 Author: Richard Eisenberg <eir at cis.upenn.edu>
 Date:   Tue Jun 25 17:42:47 2013 +0100

     Fix Trac #7939, and add kind inference to closed type families.

     Now, all open type families have result kinds that default to
     *. Top-level type families have all arguments default to *,
     and associated type families have all arguments that are not
     mentioned in the class header default to *. Closed type
     families perform kind inference, but generalize only over
     those kind variables that are parametric in their use.

     This is all a little fiddly and specific, but it seems to follow
     use cases. This commit also includes a large
     Note [Kind-checking strategies] in TcHsType that helps keep all
     of this straight.

  compiler/hsSyn/HsDecls.lhs          |   12 ++
  compiler/typecheck/TcHsType.lhs     |  224
 ++++++++++++++++++++++++++++++++--
  compiler/typecheck/TcMType.lhs      |   11 +--
  compiler/typecheck/TcTyClsDecls.lhs |  210
 +++++++++++++++++++--------------
  4 files changed, 345 insertions(+), 112 deletions(-)
 }}}

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



More information about the ghc-tickets mailing list