
27 Dec
2007
27 Dec
'07
4:55 p.m.
On Tue, 25 Dec 2007, Felipe Lessa wrote:
On Dec 25, 2007 4:27 PM, Henning Thielemann
wrote: test :: (Integral a, RealFrac a) => a test = let c = undefined in asTypeOf (round c) c
When compiling I get:
Compiling StorableInstance ( src/StorableInstance.hs, interpreted )
src/StorableInstance.hs:38:17: Warning: Defaulting the following constraint(s) to type `Double' `RealFrac a' arising from use of `round' at src/StorableInstance.hs:38:17-21 In the first argument of `asTypeOf', namely `(round c)' In the definition of `test1': test1 = let c = undefined in asTypeOf (round c) c
Interesting, I don't see this behaviour at all.
Of course, I use -Wall all the time. :-)