#2307: Poor warning for conflicting functional dependencies
-----------------------------+----------------------------------------------
    Reporter:  NeilMitchell  |       Owner:          
        Type:  bug           |      Status:  new     
    Priority:  normal        |   Component:  Compiler
     Version:  6.8.2         |    Severity:  normal  
    Keywords:                |    Testcase:          
Architecture:  Unknown       |          Os:  Unknown 
-----------------------------+----------------------------------------------
 {{{
 E:\Neil\thesis>ghci obj\haskell2\Proof_default.hs
 GHCi, version 6.8.2: http://www.haskell.org/ghc/  :? for help
 Loading package base ... linking ... done.
 [1 of 1] Compiling Proof_default    ( obj/haskell2/Proof_default.hs,
 interpreted
  )

 obj/haskell2/Proof_default.hs:177:0:
     Functional dependencies conflict between instance declarations:
       instance [incoherent] SubstRep
                               (Prop (Sat VarName)) ([VarName], [Expr])
 (Prop (Sa
 t Expr))
         -- Defined at obj/haskell2/Proof_default.hs:177:0-75
       instance [incoherent] SubstRep
                               (Prop (Sat Int)) ([Int], [Expr]) (Prop (Sat
 Expr))

         -- Defined at obj/haskell2/Proof_default.hs:180:0-67
       instance [incoherent] SubstRep
                               (Prop (Sat Int)) ([Int], [Expr]) (Prop (Sat
 Expr))

         -- Defined at obj/haskell2/Proof_default.hs:180:0-67
 Failed, modules loaded: none.
 }}}

 It has listed three items that conflict, but two of the items are actually
 the same. I would expect the error message to {{{nub}}} the list of
 instances first. Sample file attached. This bug may have been fixed in
 HEAD, with the recent warnings patch, but I cannot check (not enough disk
 space!).

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