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

Bardur Arantsson spam at scientician.net
Thu Dec 29 21:47:18 UTC 2016


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.
> 

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'm not sure actually... do we have fine-grained deprecation warnings
yet?[1] I.e. can we turn on/off individual deprecation warnings with
compiler switches? If so, then just deprecating read and pointing to a
readMaybe in some module might be the optimal solution here.

Regards,

[1] If we don't then I honestly think that this may be the single most
important feature to be able to move forward wrt. the Prelude. (Well, a
"go fix" type tool might be even better, but that's not likely to happen
any time soon.)



More information about the Libraries mailing list