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