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