[GHC] #7176: Failure to let kind variable remain uninstantiated when not needed

GHC cvs-ghc at haskell.org
Tue Sep 18 11:02:36 CEST 2012


#7176: Failure to let kind variable remain uninstantiated when not needed
-------------------------------+--------------------------------------------
  Reporter:  goldfire          |          Owner:                        
      Type:  bug               |         Status:  closed                
  Priority:  normal            |      Milestone:                        
 Component:  Compiler          |        Version:  7.6.1-rc1             
Resolution:  fixed             |       Keywords:  PolyKinds TypeFamilies
        Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple      
   Failure:  None/Unknown      |     Difficulty:  Unknown               
  Testcase:  polykinds/T7176   |      Blockedby:                        
  Blocking:                    |        Related:                        
-------------------------------+--------------------------------------------

Comment(by simonpj):

 In the end I did the same tiny fix on the HEAD, to avoid getting tangled
 up in later changes
 {{{
 commit f4c327ad08d9df0fbafa0ad476a9ef26f8cd6abb
 Author: Simon Peyton Jones <simonpj at microsoft.com>
 Date:   Fri Sep 14 11:12:01 2012 +0100

     When allocating a new kind variable, do so with newMetaUnique

 >---------------------------------------------------------------

  compiler/typecheck/TcMType.lhs |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/compiler/typecheck/TcMType.lhs
 b/compiler/typecheck/TcMType.lhs index a212f25..67ed967 100644
 --- a/compiler/typecheck/TcMType.lhs
 +++ b/compiler/typecheck/TcMType.lhs
 @@ -113,7 +113,7 @@ import Data.List        ( (\\), partition, mapAccumL )

  \begin{code}
  newMetaKindVar :: TcM TcKind
 -newMetaKindVar = do { uniq <- newUnique
 +newMetaKindVar = do { uniq <- newMetaUnique
                     ; ref <- newMutVar Flexi
                     ; return (mkTyVarTy (mkMetaKindVar uniq ref)) }
 }}}

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



More information about the Glasgow-haskell-bugs mailing list