
#10100: Bogus "redundant constraint" warning with functional dependencies -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: simonpj Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): Humph. In one sense the constraint IS redundant: you simply don't need the evidence (dictionary) for `Add a b ab` to create evidence for `Add (Succ a) b (Succ ab)`. But you want nevertheless to allow this (or not warn about it), because you want to prove things like `Add (Succ Zero) beta (Succ Zero)`, by unifying `beta := Zero`. That won't happen unless you generate the constraint `Add Zero beta Zero`. Hmm, well I suppose we should suppress the warnings where there are functional dependencies. I'll work on it. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10100#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler