patch applied (packages/base): Make two type defaults explicit
Simon Peyton Jones
simonpj at microsoft.com
Fri May 29 04:44:17 EDT 2009
Fri May 29 01:35:49 PDT 2009 simonpj at microsoft.com
* Make two type defaults explicit
Now that -Werror rejects programs that use silent type-class defaulting,
we must commit in the source code.
I've used Double in CPUTime, which is the same as was picked automatically
before, but I expect Float would be ok.
realToInteger :: Real a => a -> Integer
realToInteger ct = round (realToFrac ct :: Double)
In GHC.Float I used Float (rather that than the auto-picked Double)
because I'm pretty certain it has enough precision.
-- f :: Integer, log :: Float -> Float,
-- ceiling :: Float -> Int
ceiling ((log (fromInteger (f+1) :: Float) +
M ./GHC/Float.lhs -1 +3
M ./System/CPUTime.hsc -2 +5
View patch online:
More information about the Cvs-libraries