#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                   |      Milestone:  6.10 branch
Component:  Compiler (Type checker)  |        Version:  6.9        
 Severity:  minor                    |     Resolution:             
 Keywords:                           |     Difficulty:  Unknown    
 Testcase:                           |   Architecture:  Multiple   
       Os:  Multiple                 |  
-------------------------------------+--------------------------------------
Comment (by claus):

 I just noticed that `GHCi, version 6.9.20080514` accepts partially applied
 type families, which would permit `foo2`'s type equality to succeed:
 {{{
 {-# LANGUAGE TypeFamilies #-}
 type family F a :: * -> *
 type instance F Int  = []
 type instance F Bool = Id
 type family Id a :: *
 type instance Id a = a

 foo2 :: (F Int a ~ F Bool [a]) => a -> [a]
 foo2 = undefined
 }}}
 (note the partially applied `Id`)

 I thought this was covered in #2157, but both that ticket and its summary
 at TypeFunctionsStatus only talk about partially applied type synonyms,
 assuming that partially applied type families are already impossible.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2146#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to