#7171: erroneous overlapping instances reported with FunDeps
---------------------------------------------+------------------------------
  Reporter:  jwlato                          |          Owner:                  
     
      Type:  bug                             |         Status:  new             
     
  Priority:  highest                         |      Milestone:  7.6.1           
     
 Component:  Compiler (Type checker)         |        Version:  7.6.1-rc1       
     
Resolution:                                  |       Keywords:  type classes, 
fundeps
        Os:  Unknown/Multiple                |   Architecture:  
Unknown/Multiple     
   Failure:  GHC rejects valid program       |     Difficulty:  Unknown         
     
  Testcase:  typecheck/should_compile/T7171  |      Blockedby:                  
     
  Blocking:                                  |        Related:                  
     
---------------------------------------------+------------------------------
Changes (by simonpj):

  * milestone:  7.8.1 => 7.6.1


Comment:

 I think this is fixed by this HEAD patch, which I have now merged into
 7.6:
 {{{
 commit 702f0db0dd4e85de445e5edb5e6294057ebe6792
 Author: Simon Peyton Jones <[email protected]>
 Date:   Wed Aug 22 18:03:12 2012 +0100

         Numerous small changes to the constraint solver

         The main thing is that we now keep unsolved Derived constraints in
 the
         wc_flats of a WantedConstraints, rather than discarding them each
 time.
         This actually fixes a poential (admittedly obscure) bug, when we
 currently
         discard a superclass constraint, and may never re-generate it, and
 may
         thereby miss a functional dependency.

         Instead, reportErrors filters out Derived constraints that we
 don't want
         to report.

         The other changes are all small refactorings following our walk-
 through.

     MERGED from commit 9c0a6bbb0194f65cd62e48936c0c00fc4888eef3 on HEAD

  compiler/typecheck/TcErrors.lhs   |   53 +++++++++-
  compiler/typecheck/TcHsSyn.lhs    |   50 ++++------
  compiler/typecheck/TcInteract.lhs |  192
 +++++++++++++------------------------
  compiler/typecheck/TcRnTypes.lhs  |   42 ++++----
  compiler/typecheck/TcSMonad.lhs   |  137 +++++++++++++-------------
  compiler/typecheck/TcSimplify.lhs |   86 +----------------
  6 files changed, 228 insertions(+), 332 deletions(-)
 }}}
 Can you try now with the 7.6 branch when the next snapshot appears?

 I'll add your example as a regression test (for HEAD).

 Simon

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