From 63d3fd047776a0d5f3406a17f0b51db4ed817b62 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 3 Mar 2019 21:47:38 -0500 Subject: [PATCH] src/IPv4Address.hs: rename a variable. --- src/IPv4Address.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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. -- 2.43.2