[Haskell-cafe] Redundant/overlapping patterns?

Todd Wilson twilson at csufresno.edu
Sat Jul 22 00:14:00 UTC 2023


On Fri, Jul 21, 2023 at 3:27 PM Jeff Clites via Haskell-Cafe <
haskell-cafe at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20230721/5ed5e93b/attachment.html>


More information about the Haskell-Cafe mailing list