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
Ignore-this: 398a10db1612dbef1723b449bff26782
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:
http://darcs.haskell.org/packages/base/_darcs/patches/20090529083549-1287e-48504a8e969801d01ee9e54c9b35b916649dec7d.gz
More information about the Cvs-libraries
mailing list