int to float problem
Zdenek Dvorak
rakdver@hotmail.com
Sat, 01 Mar 2003 21:10:39 +0000
Hello,
[snip]
>Try
>
>intToFloat :: Int -> Float
>intToFloat n = fromInteger (toInteger n)
[snip]
>Use the Prelude function realToFrac.
it sometimes happens to me that I must spend some time browsing
prelude to devise somethink like this; it might be useful to have
a library for this, that would define
class Coerce a b where
coerce :: a->b
of course this cannot work without multiparametric type classes.
Zdenek
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail