Feedback on -Wredundant-constraints

2016-06-03 Thread Adam Foltzer
With 8.0.1 freshly arrived, I'm taking on the task of updating a number of our larger projects here at Galois. I made a couple of these comments briefly on a relevant Trac ticket[1], but I wanted to open this discussion to a wider audience. We tend to use -Wall (and -Werror, in CI environments), a

Re: Feedback on -Wredundant-constraints

2016-06-04 Thread Carter Schonwald
Agreed. Ive hit exactly these issues myself to the point where i err on suppressing that warning in my code now. In part because i use those unused constraints as a semantic contract. On Friday, June 3, 2016, Adam Foltzer wrote: > With 8.0.1 freshly arrived, I'm taking on the task of updating

Re: Feedback on -Wredundant-constraints

2016-06-06 Thread Richard Eisenberg
I've been bitten by this too and had to disable the warning. Let me propose an alternative; * -Wredundant-constraints becomes only your Warning 1. That is, it reports when a user writes a constraint that is fully equivalent to some other, strictly smaller constraint, like suggesting simplifying

Re: Feedback on -Wredundant-constraints

2016-06-06 Thread Carter Schonwald
Strong emphatic agreement. Both that it should split up thusly and that the latter shouldn't be in WALL. Otherwise it poisons the well for all be the most sophisticated users of type level programming. I don't suppose there's any hope of having this resolved prior to GHC 8.2 because it is a real u

Re: Feedback on -Wredundant-constraints

2016-06-06 Thread Eric Seidel
On Mon, Jun 6, 2016, at 07:37, Carter Schonwald wrote: > I don't suppose there's any hope of having this resolved prior to GHC 8.2 > because it is a real usability regression? Because I think we can all > agree > that the proposed change would not break any 8.0 series code, and > positively impac

Re: Feedback on -Wredundant-constraints

2016-06-06 Thread Carter Schonwald
It's a tall ask, but why not? On Jun 6, 2016 12:16 PM, "Eric Seidel" wrote: > > > On Mon, Jun 6, 2016, at 07:37, Carter Schonwald wrote: > > I don't suppose there's any hope of having this resolved prior to GHC 8.2 > > because it is a real usability regression? Because I think we can all > > agre

Re: Feedback on -Wredundant-constraints

2016-06-06 Thread Carter Schonwald
To better elaborate : I definitely want this for the next major version i.e. 8.2.* , but I'm also wondering if perhaps the "overly constrained type" warning should be flat out removed from Wall even in ghc 8.0.2, On Monday, June 6, 2016, Carter Schonwald wrote: > It's a tall ask, but why not? >

Re: Feedback on -Wredundant-constraints

2016-06-06 Thread David Feuer
I strongly agree with per-declaration warning suppression. But I'd like to leave both warnings on by default in -Wall. 1. Sometimes an upstream library will drop a constraint. The warning lets me know I can drop it too. 2. Sometimes an implementation evolves from a draft that requires a constrain

Re: Feedback on -Wredundant-constraints

2016-06-11 Thread Carter Schonwald
Either way, do we have a strong agreement that for ghc 8.2 that this warning should be split up and the noiser part should be moved out of the default wall set? On Monday, June 6, 2016, Carter Schonwald wrote: > To better elaborate : I definitely want this for the next major version > i.e. 8.2.

Re: Feedback on -Wredundant-constraints

2016-06-12 Thread Eric Seidel
I don't have any personal experience with the new warning, but it does sound to me like there are two separate warnings (redundant vs unused constraints) combined under a single flag. So I would support separating them! On Sat, Jun 11, 2016, at 09:38, Carter Schonwald wrote: > Either way, do we ha