#714: Inconsistency between handling functional dependencies in class and
signature constraints
-------------------------------------+--------------------------------------
 Reporter:  [EMAIL PROTECTED]  |          Owner:  simonpj
     Type:  bug                      |         Status:  new    
 Priority:  low                      |      Milestone:  _|_    
Component:  Compiler (Type checker)  |        Version:  6.5    
 Severity:  normal                   |     Resolution:         
 Keywords:                           |     Difficulty:  Unknown
 Testcase:                           |   Architecture:  Unknown
       Os:  Unknown                  |  
-------------------------------------+--------------------------------------
Comment (by claus):

 could this please be re-milestoned, for 6.10, as that seems to be the
 target for completing the overhaul mentioned by Simon PJ.

 since this is reported as a scope error, the same inconsistency now
 applies to TFs, but there we have the additional oddity that the signature
 constraint is simply dropped even if there are no type instances at all..:
 {{{
 class FD a b | a -> b
 -- class FD a b => CFD a -- Not in scope: type variable `b'
 fd :: FD a b => a
 fd = undefined

 type family TF a
 -- class TF a ~ b => CTF a -- Not in scope: type variable `b'
 tf :: TF a ~ b => a
 tf = undefined
 }}}

 {{{
 *Main> :t fd
 fd :: (FD a b) => a
 *Main> :t tf
 tf :: a
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/714#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to