Parsing Ratio with zero denominator

Sven Panne svenpanne at gmail.com
Sun May 31 12:34:52 UTC 2020


Am So., 31. Mai 2020 um 10:06 Uhr schrieb Dannyu NDos <ndospark320 at gmail.com
>:

> I mean, shouldn't there be a guard? [...]
>

In general, I'm heavily opposed against any change which can introduce
subtle changes in the semantics without any warning/compilation error.
Consider e.g. length (readsPrec 1 "2 % 0" :: [(Rational, String)]).
Currently, this returns 1, which will silently turn into 0 with your
proposed change, at least if I see this correctly. Therefore: -100 for this
proposal. :-}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20200531/8b9f6642/attachment.html>


More information about the Libraries mailing list