<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Hi Erik,</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Sun, Aug 14, 2016 at 11:01 PM, Erik Hesselink wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 14 August 2016 at 16:00, Sean Leather wrote:<br>
> On Sun, Aug 14, 2016 at 9:48 PM, Tom wrote:<br>
>><br>
>> Is there a reason to not allow '.' as a separator for Rational's Read<br>
>> instance, so that both "1%2" and "0.5" can be read?<br>
><br>
> While it would make read :: String -> Rational more convenient, I'm not sure<br>
> it would be a good idea to have read accept input that will never be<br>
> produced by show :: Rational -> String.<br>
<br>
</span>This already happens everywhere, right? For example, if you have a Foo<br>
{ bar :: Int, baz :: String } with the derived read instance, this<br>
works:<br>
<br>
read "Foo{bar=0x01,      baz     =      \"h\101llo\"}" :: Foo<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>True. I'm not sure how far down the decimal/scientific notation parsing hole you'd want to take the Ratio Read instance. Anyway, my point was that there is an existing alternative that doesn't require changing the instance and is not that inconvenient.</div><div><br></div><div>Regards,</div><div>Sean</div></div></div></div>