
27 Feb
2006
27 Feb
'06
8:33 p.m.
I am not sure if this has been brought up for haskell-prime or not, but a while ago someone noticed that 'realToFrac' as specified in the report can't propagate NaN or infinity values properly since it goes through a Rational intermediate stage. this has the odd effect in ghc of making such conversions only work when optimization is used so the RULES turning Float<->Double conversion into their C counterparts fire. The proposed solution was to add NaN, +Infinity, and -Infinity to rational with the representations 0 :% 0, 1 :% 0, and -1 :% 0 respectively. Seems straightforward, (and generally useful) but we should make sure not to forget it for haskell-prime. John -- John Meacham - ⑆repetae.net⑆john⑈