#4981: inconsistent class requirements with TypeFamilies and FlexibleContexts
----------------------------------------+-----------------------------------
    Reporter:  ganesh                   |        Owner:                         
  
        Type:  bug                      |       Status:  new                    
  
    Priority:  normal                   |    Milestone:                         
  
   Component:  Compiler (Type checker)  |      Version:  7.0.1                  
  
    Keywords:                           |     Testcase:                         
  
   Blockedby:                           |   Difficulty:                         
  
          Os:  Unknown/Multiple         |     Blocking:                         
  
Architecture:  Unknown/Multiple         |      Failure:  GHC rejects valid 
program
----------------------------------------+-----------------------------------

Comment(by simonpj):

 * Removing this silent superclass parameters is reasonable, and would
 suppress this particular error, but the underlying problem would remain.

  * Giving priority to equalities is also probably reasonable for
 efficiency reasons, and would also suppress this error, but again it's not
 a solution; for example, the equality in question might be somehow hidden
 inside a superclass equality of a class constraint that arises from a use
 of an instance...

  * I think the real solution is to ''refrain from using an instance
 declaration if there is an overlap with a Given''.  This is what we do
 already for overlapping instances (unless you use
 `-XAllowIncoherentInstances`); we just need to extend it for givens.

 I'll discuss this with D.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4981#comment:3>
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