From: Michael Orlitzky Date: Fri, 2 Apr 2010 04:43:27 +0000 (-0400) Subject: Unqualify the Data.Char import, and specify the functions that we need. X-Git-Tag: 0.0.1~93 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=8f9fa8f48018f344b9e2027a01d7d45b8554387c;p=hath.git Unqualify the Data.Char import, and specify the functions that we need. --- 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.