WARNING pragmas in `Prelude.undefined` and `Prelude.error`

Zemyla zemyla at gmail.com
Sun Dec 22 12:15:08 UTC 2019


The most common legitimate usage for undefined I have is strictness:

func x y | x `seq` False = undefined
func x y = ...

There's nothing else that would go there, and when it's compiled, the
reference to undefined disappears.

On Sun, Dec 22, 2019, 05:50 chessai . <chessai1996 at gmail.com> wrote:

> Right, it's been discussed before IIRC, and i know I've certainly given it
> passing thoughts. I think this isn't worth it because of breakage. Many
> people use -Wall -Werror, so I see this as a no-go.
>
> Thanka
>
> On Sun, Dec 22, 2019, 6:45 AM Vilem Liepelt <vliepelt at futurefinance.com>
> wrote:
>
>> Has there been any discussion about adding WARNING pragmas to
>> `Prelude.undefined` and `Prelude.error`, as done in some custom preludes?
>>
>> I suppose this hasn't been done yet to avoid breaking existing code which
>> makes "legitimate" use of those helpers?
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20191222/977d9630/attachment.html>


More information about the Libraries mailing list