<div dir="ltr"><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">Hi Henning,</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">Thanks for the quick response!</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">Yes, that's basically how I fixed it but I really don't want to have to do that since the code is correct. Not a big deal but may be irritating to beginners or large projects that want to eliminate warnings. Do you think an ER would be rejected ? If I remember correctly there is already detection of incomplete pattern matching that is ok and in such cases warnings are omitted. This would be similar to that.</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">Cheers,</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">George</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 16, 2024 at 11:46 AM Henning Thielemann <<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
On Tue, 16 Apr 2024, George Colpitts wrote:<br>
<br>
> ghc should be able to deduce correct use of partial functions and not give a warning in such cases, e.g.<br>
> in 9.8.2<br>
> <br>
> if null ys then [] else [(xs,tail ys)])<br>
> <br>
> gets a warning<br>
> <br>
> warning: [GHC-63394] [-Wx-partial]<br>
> <br>
> but it is clear that this use of tail will never be a problem so IMHO that line of code should not get a<br>
> warning. <br>
> <br>
> Does anybody know if there is a plan or enhancement request to eliminate such warnings? <br>
<br>
<br>
I would just use good old pattern matching:<br>
<br>
case ys of<br>
[] -> []<br>
_:zs -> [(xs,zs)]</blockquote></div>