From 8f9fa8f48018f344b9e2027a01d7d45b8554387c Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 2 Apr 2010 00:43:27 -0400 Subject: [PATCH] Unqualify the Data.Char 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 669ed4f..5336537 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,4 +1,4 @@ -import qualified Data.Char as DC +import Data.Char (digitToInt, intToDigit) import qualified Data.List as DL import qualified Numeric as N import System.Exit (exitFailure) @@ -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 DC.intToDigit n "" +base_two n = 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 DC.digitToInt s + parsed = N.readInt 2 is_binary_digit digitToInt s -- A regular expression that matches a non-address character. -- 2.44.2