Skip to content

Make some warnings more severe #679

@josephcsible

Description

@josephcsible

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions