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

Daniel Díaz Casanueva dhelta.diaz at gmail.com
Mon Dec 23 19:48:48 UTC 2019


Oh, I see. Sorry. I totally misunderstood the proposal. I should have read
more carefully.

I think undefined and error are useful functions to have, so why adding
WARNING to them? For example, you can fold an infinite structure `xs` with
`foldr f undefined xs` (for some proper `f`) without needing to define or
look for an alternative to `Data.Foldable.foldr`.

Am Mo., 23. Dez. 2019 um 17:33 Uhr schrieb Vilem Liepelt <
vliepelt at futurefinance.com>:

>
> > On 23 Dec 2019, at 18:10, Daniel Díaz Casanueva <dhelta.diaz at gmail.com>
> wrote:
> >
> > Some warnings are not included in -Wall (for instance
> -Wincomplete-uni-patterns). New warning flags can be added without breaking
> any code.
>
> Agreed, Daniel, but if we added a warning/deprecation pragma to the
> library (which is what I had asked about), then this would get triggered by
> -Wdeprecations which is part of -Wall. I'm not sure adding a flag
> specifically for usages of `error`/`undefined` makes much sense. E.g. what
> if I bind those names to genuine values?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20191223/6f1100ec/attachment.html>


More information about the Libraries mailing list