
#10635: -fwarn-redundant-constraints should not be part of -Wall -------------------------------------+------------------------------------- Reporter: Lemming | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.11 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: #9939, #9973, | Differential Rev(s): #10100, #10183, #11370 | Wiki Page: | -------------------------------------+------------------------------------- Comment (by konn): I think that `-fwarn-redundant-constraints` should be still a part of `-Wall`, but we need some way to suppress warning for ''intensionally tightened'' constraints. In such a viewpoint, I like something like Simon's `{-# NO_WARN_REDUNDANT_CONSTRAINTS #-}` annotation. I think it's likely to happen that, in the same function, some constraint is intentionally tightened but other is not. So I think that it's ideal that one can specify ''necessity'' for each constraint. Example: {{{ flipAdd :: (Multiplicative r, {-# NON_REDUNDANT #-} Abelian r) => r -> r -> r flipAdd x y = x + y }}} Compiler should warn `Multiplicative r` as redundant since it doesn't use any multiplication, but `Abelian r` should be unwarned because it's marked as ''non-redundant''. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10635#comment:27 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler