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
-- 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
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.