
hello, how do I convert an Word32 (or WordXYZ) to Int, or Integer, or Float, ...? The Int conversion is the priority. Thanks. Matej 'Yin' Gagyi

On Wed, 2005-07-20 at 11:43 +0200, yin wrote:
hello,
how do I convert an Word32 (or WordXYZ) to Int, or Integer, or Float, ...? The Int conversion is the priority.
Thanks.
Matej 'Yin' Gagyi
fromIntegral to convert to an instance of Integral, such as Int, Integer etc Cheers, Bernie.

Bernard Pope wrote:
On Wed, 2005-07-20 at 11:43 +0200, yin wrote:
how do I convert an Word32 (or WordXYZ) to Int, or Integer, or Float, ...? The Int conversion is the priority.
fromIntegral to convert to an instance of Integral, such as Int, Integer etc
Thank you, but how to "Work32 -> Int"? Matej 'Yin' Gagyi

On Wed, 20 Jul 2005, yin wrote:
Bernard Pope wrote:
On Wed, 2005-07-20 at 11:43 +0200, yin wrote:
how do I convert an Word32 (or WordXYZ) to Int, or Integer, or Float, ...? The Int conversion is the priority.
fromIntegral to convert to an instance of Integral, such as Int, Integer etc
Thank you, but how to "Work32 -> Int"?
Note that this compiles: foo :: Word32 -> Int foo = fromIntegral fromIntegral really is what you want. -- Mark
participants (3)
-
Bernard Pope
-
Mark Carroll
-
yin