
15 Aug
2016
15 Aug
'16
8:39 a.m.
On 08/14/2016 06:54 PM, David Feuer wrote:
Since decimal notation is defined in terms of fromRational, it seems a bit strange that the notation doesn't work for read::String->Rational. I'd be in favor of allowing it. I wouldn't expect too severe a performance penalty.
One potential gotcha: ghci> read (show (1/3)) == (1/3) True ghci> read (show (1/3 :: Float)) == (1/3) False When does it work? Is it platform-dependent?