-
Notifications
You must be signed in to change notification settings - Fork 205
Description
I think a few of our warnings need to be made more severe by default, in particular those where a non-fixed part of the expression is discarded, implying that the programmer meant something other than what the expression is actually equivalent to. For example, someone who writes sum (x,y,z) probably meant x+y+z even though it's really equivalent to just z. Similarly, someone who writes x <* pure True probably meant x *> pure True, even though it's really equivalent to just x. The common theme I see here is that if you ever get one of these, its meaning is probably less "this code can be simplified" and more "this code doesn't do what you think it does". What do you think of bumping these sorts of things up to errors, or maybe adding some "severe warning" entry in between warnings and errors, and also inhibiting refactor from automatically "fixing" them?