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


_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to