
#11582: Redundant constraints warning complains that (a ~ b) is redundant -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc2 checker) | Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): I see. Yes that is true. Sort of. Removing a type class with functional dependencies might have the same effect. Or a type class with a superclass that had functional depencies. Or a type class with a superclass equality like {{{ class (a~b) => C a b where ... }}} And with higher-kinded stuff I don't think we can predict with precision. I suppose you could have `-fwarn-redundant-constraints-for-definition` and `-fwarn-redundant-constraints-for-call-sites`, to say what level of redundancy you wanted to report or at least make best-efforts to report (see above). But I do see what you mean, and it might be good to have such an example in the user manual. Also if you felt like implementing per-signature control that would be cool. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11582#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler