Proposal: Rational read

16 Aug
2016
16 Aug
'16
10:16 a.m.
It has been suggested that (read "0.5" :: Rational) need not work because (show (0.5::Rational)) will never yield the string "0.5". In contrast, (read "1" :: Double) does work, even though (show (1::Double)) will never yield the string "1". The inconsistency is stark. Doug
3199
Age (days ago)
3199
Last active (days ago)
0 comments
1 participants
participants (1)
-
Doug McIlroy