[GHC] #11370: Redundant superclass warnings being included in -Wall destroys the "3 Release Policy"

GHC ghc-devs at haskell.org
Thu Jan 14 18:22:35 UTC 2016


#11370: Redundant superclass warnings being included in -Wall destroys the "3
Release Policy"
-------------------------------------+-------------------------------------
        Reporter:  ekmett            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.0.1
       Component:  Compiler (Type    |              Version:  7.10.3
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11369            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by ekmett):

 I've talked with some folks on the committee informally, and with Gershom
 while I'm visiting New York at the moment:

 At the very least, I definitely think the warning for redundant
 constraints shouldn't be in the default warning set. It goes off in
 situations where there is no good way to mask it at this time.

 Somewhat ironically the "3 release compatible" version of adding
 `redundant-constraints` would be to add it as an option now and consider
 turning it on in -Wall in 8.4 when such a `-Wno-redundant-constraints`
 option would be supported by 3 releases of the compiler. Possibly with
 Gershom's suggestion from the mailing list of making unrecognized `-Wfoo`
 options emit a single warning about an unrecognized option rather than
 have the compiler emit an error and die. This wouldn't preclude adding it
 to ` -Wlint` or `-Weverything` when the warning overhaul goes in in 8.2.

 Putting it in `-Wall` weakens the 3 release policy in a way that requires
 users to use cabal trickery to pass ghc options to avoid warnings in an
 uncomfortable way -- since old GHCs won't recognize a `-Wno-redundant-
 constraints` option, but if you feel it really belongs there I guess that
 is just what we'd have to do.

 In a perfect world this'd be relegated to a sort of `-Wlint` which checks
 style.

 So, this seems to suggest a few ways forward

 1) Just remove it from the default constraint set. This is the minimum we
 should do.

 2) Remove it from both the default constraint set and -Wall. Implement
 Gershom's suggestion that unrecognized -Wfoo options passed to the
 compiler simply cause it to warn about an unrecognized option. This would
 give us the option to add it to whatever `-Wlint` equivalent is added in
 8.2 and an option to bring it into `-Wall` in 8.4 and weaken the 3 release
 policy accordingly, but now in a way that doesn't require the user to play
 with cabal flags.

 1 is easy but damages the already weak 3 release policy almost to the
 point of irreparability: few people seem willing to use if clauses in
 cabal files, the reaction is much the same as to CPP hacks.

 2 is a fair bit more work, but would serve to placate the folks for whom
 we put the 3 release policy in place in the first place.

 I'd prefer 2, but we could live with 1 if the amount of work involved was
 too prohibitive and GHC HQ felt strongly about the issue.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11370#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list