src/IPv4Address.hs: convert Int to Word32 before doing math in toEnum.
On x86, the machine Int type isn't big enough to hold half of the
IPv4 address space. Big addresses get converted into negative numbers,
and all hell breaks loose. Unfortunately, the Int type is baked into
the Enum typeclass, so we can't avoid it entirely. We can however
cast to Word32 before doing any math.
This commit updates the toEnum implementation for IPv4Address to
convert back and forth between Word32, fixing part of this bug.
However, the inverse property of toEnum and fromEnum is still
failing for IPv4Address.
Thanks to Thomas Deutschmann <whissi@gentoo.org> for finding the bug.