Fwd: Proposal: Add readMaybe (and possibly readEither) to Prelude, make Haddocks for read more cautionary

David Menendez dave at zednenem.com
Fri Dec 30 07:48:41 UTC 2016


On Thu, Dec 29, 2016 at 11:56 PM, Edward Kmett <ekmett at gmail.com> wrote:

> Read is one of very few classes with stated a deriving technique in the
> Haskell Report.
>
...

> The cure feels a lot worse than any disease. Heck, read isn't even a
> member of the class, so this would just spite users and not even address
> the symptom raised by this thread.
>

I may have been unclear. My (weak) preference is to leave things as they
are, from an API standpoint, and mention that read is partial in its
documentation. I am neutral on deprecation.

If at some point the Haskell community decides to refactor the Prelude, it
should figure out what Read is for and whether that functionality is
essential enough to be in the Prelude.


>
> -Edward
>
>
> On Thu, Dec 29, 2016 at 11:50 PM, David Menendez <dave at zednenem.com>
> wrote:
>
>> On Thu, Dec 29, 2016 at 4:47 PM, Bardur Arantsson <spam at scientician.net>
>> wrote:
>>
>>> On 2016-12-29 21:12, Andreas Abel wrote:
>>> >
>>> > I am in favor of deprecating "read" and pointing to a total version in
>>> a
>>> > library.  Otherwise, I'd leave the Prelude unchanged.
>>>
>>
>> This is also my preference. If we *have* to change the Prelude, I’d
>> prefer moving Read out entirely.
>>
>> But that throws a wrench in the works of people who want to be "-Wall"
>>> clean... unless you mean "deprecated" in the sense of being *documented*
>>> as deprecated rather than actually marked as such (causing deprecation
>>> warnings during compilation).
>>>
>>
>> I don't think making life easy for -Wall clean people should be a goal.
>> The whole point of warnings is that they indicate things that might not be
>> a problem. Otherwise, they’d be errors. This is especially true for
>> warnings that only show up if you use -Wall instead of -W.
>>
>> --
>> Dave Menendez <dave at zednenem.com>
>> <http://www.eyrie.org/~zednenem/>
>>
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>
>>
>


-- 
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>



-- 
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20161230/aec5bf67/attachment-0001.html>


More information about the Libraries mailing list