[GHC] #2146: Decomposition rule for equalities is too weak in case of higher-kinded type families

GHC trac at galois.com
Tue Mar 11 10:17:06 EDT 2008


#2146: Decomposition rule for equalities is too weak in case of higher-kinded type
families
-------------------------+--------------------------------------------------
    Reporter:  chak      |       Owner:  chak                   
        Type:  bug       |      Status:  new                    
    Priority:  normal    |   Component:  Compiler (Type checker)
     Version:  6.9       |    Severity:  minor                  
    Keywords:            |    Testcase:                         
Architecture:  Multiple  |          Os:  Multiple               
-------------------------+--------------------------------------------------
 {{{
 foo :: (F Int a ~ F Int [a]) => a -> [a]
 foo = undefined
 }}}
 gives us
 {{{
     Occurs check: cannot construct the infinite type: a = [a]
 }}}
 but
 {{{
 foo :: (F Int a ~ F Bool [a]) => a -> [a]
 foo = undefined
 }}}
 doesn't - although both should lead to the same error.

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


More information about the Glasgow-haskell-bugs mailing list