Hennus Bergman writes:
>
> Anybody know why in the following program 2147483648::Word32
> is printed as '0'?
>
Hi,
many thanks for reporting this. It's a bug, the above expression is
expanded into
(fromInteger 2147483648)::Word32
but the Num.fromInteger method for Word32 goes from Integer to Word32
via Int, which is not the Right Thing to do. Fixed in the next
release.
>
> Any ideas how to fix this?
>
Stick with maxBound or work around it with lit-lits, i.e.,
(``2147483648'' :: Word32)
(if you're not using -O, add -fno-prune-tydecls to the command line
when compiling this.)
--Sigbjorn