From cb566b4bd9eda87490864cce432a4f295068b452 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 2 Apr 2010 00:46:33 -0400 Subject: [PATCH] Unqualify the Numeric import, and specify the functions that we need. --- src/Main.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 13f3ff8..3eb4c2a 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,6 +1,6 @@ import Data.Char (digitToInt, intToDigit) import Data.List (concatMap, intercalate, intersperse, splitAt) -import qualified Numeric as N +import Numeric (readInt, showIntAtBase) import System.Exit (exitFailure) import Text.Regex.Posix @@ -20,7 +20,7 @@ maskbits cidr = read ((splitWith (`elem` "/") cidr) !! 1) -- Takes an Int, and returns its base-two representation as a String. base_two :: Int -> String -base_two n = N.showIntAtBase 2 intToDigit n "" +base_two n = showIntAtBase 2 intToDigit n "" -- Takes a set of octets, and converts them to base-two @@ -104,7 +104,7 @@ base_two_to_base_ten s = else fst (parsed !! 0) where - parsed = N.readInt 2 is_binary_digit digitToInt s + parsed = readInt 2 is_binary_digit digitToInt s -- A regular expression that matches a non-address character. -- 2.43.2