[GHC] #10635: -fwarn-redundant-constraints should not be part of -Wall
GHC
ghc-devs at haskell.org
Mon Jun 6 10:48:32 UTC 2016
#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 mboes):
Replying to [comment:15 acfoltzer]:
> I also wonder if it might make sense to distinguish between certain
types of redundancy: for example, in our code a redundancy arising from a
superclass relationship (e.g., `(Functor f, Applicative f)`) is almost
always something we want to fix, but unused classes are almost always an
API design choice rather than a bug we wish to avoid.
Our particular bug (and I think there are many situations like it), fell
in the latter category (it was a mistakenly unused constraint). If only
the former category is included in -Wall, then -Wall will be useless to us
and others to catch similar bugs in the future. We'll have to remember to
`-Wall -Wsome-other-warning-flag` in all projects.
I think what would be nice though is if there existed a pragma to mark a
constraint as explicitly redundant, for those who want that. In general,
it's nicer to be able to specify things at fine granularity - disabling
redundant constraint checking at the module level is too coarse a
granularity. Probably a matter for a separate ticket.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10635#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list