Open expipiplus1 opened 3 years ago
Great counter example! So I guess we have to figure out how often this happens (is it super rare, or merely just rare) and if it's more than super-rare I suspect this hint needs disabling.
Obviously a substantial project: I wonder how much could be learned by applying hints over all of (compiling) Hackage and seeing what stops compiling.
Before we had apply refactor there wasn't really any realistic chance of doing it. Now it seems like it would be pretty interesting.
Consider that matching on
Foo
brings some constraints into scope which are required bybaz
Hlint changes things thusly:
And the constraint is no longer in scope.
This is obviously quite uncommon so I'm not sure what the protocol is here, I'm perfectly happy disabling this lint.
(It also ate the
bar @s
expression when applying this automatically, but I guess that should be a separate issue (Looks similar to this: https://github.com/lspitzner/brittany/pull/324#issuecomment-727607154)