]> gitweb.michael.orlitzky.com - hath.git/blobdiff - src/IPv4Address.hs
src/IPv4Address.hs: rename a variable.
[hath.git] / src / IPv4Address.hs
index 4399b05f3ecb1728eca31be6eae5e833a23a3b5b..38aec8dd39c5250279a05357db753c8aa2247cf2 100644 (file)
@@ -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.