On Fri, Jul 21, 2023 at 5:14 PM Todd Wilson <twilson@csufresno.edu> wrote:
On Fri, Jul 21, 2023 at 3:27 PM Jeff Clites via Haskell-Cafe <haskell-cafe@haskell.org> wrote:
Oh no I take that back, it is talking about a specific pattern:

>>    Pattern match is redundant
>>    In a case alternative: B -> ...

But I do think a better complaint is that you don't need a case expression there at all, but it seems like that's not actually what it's complaining about. Hmm.

My take-away from all this is that, if a case branch can be determined *statically* (i.e., without applying any evaluation steps) not to match, then it is "redundant." If there are counterexamples to this take-away, though, please let me know!

--Todd

At the risk of descending into bikeshedding, I think "redundant" applies to anything that can be safely removed, and it is widely used in the ghc error messages.  Using different words like "unreachable"  and "unnecessary" is distracting and doesn't confer any benefit that I can see.