From: Michael Orlitzky Date: Mon, 4 Mar 2019 02:47:38 +0000 (-0500) Subject: src/IPv4Address.hs: rename a variable. X-Git-Tag: 0.5.1~12 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=hath.git;a=commitdiff_plain;h=63d3fd047776a0d5f3406a17f0b51db4ed817b62 src/IPv4Address.hs: rename a variable. --- diff --git a/src/IPv4Address.hs b/src/IPv4Address.hs index 4399b05..38aec8d 100644 --- a/src/IPv4Address.hs +++ b/src/IPv4Address.hs @@ -192,7 +192,7 @@ instance Enum IPv4Address where -- | Convert an 'Int' @x@ to an 'IPv4Address'. Each octet of @x@ is -- right-shifted by the appropriate number of bits, and the fractional -- part is dropped. - toEnum y = + toEnum signed_x = IPv4Address oct1 oct2 oct3 oct4 where -- Convert the input Int to a Word32 before we proceed. On x86, @@ -201,7 +201,7 @@ instance Enum IPv4Address where -- below doesn't work. The Word32 type is unsigned, so we do the -- math on that and then convert everything back to Int later on -- once we have four much-smaller non-negative numbers. - x = fromIntegral y :: Word32 + x = fromIntegral signed_x :: Word32 -- Chop off the higher octets. x1 = x `mod` 2^32, would be -- redundant.