Skip to content

Poor warning for conflicting functional dependencies

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!).

Trac metadata
Trac field Value
Version 6.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information