X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FMain.hs;h=5b034ba5119bf336721c334a3c1fe69f1518fd83;hb=45ac9baca360d0f0dabe4576fb44c1634a50dbf7;hp=d8c760080df39c9cf2d0a29021b2271ea970adb4;hpb=942b8ef3bc5830ca0defa62342d55550aea59934;p=hath.git diff --git a/src/Main.hs b/src/Main.hs index d8c7600..5b034ba 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,3 +1,6 @@ +module Main +where + import Control.Concurrent.ParallelIO.Global ( parallel, stopGlobalPool ) @@ -9,29 +12,29 @@ import Data.String.Utils (splitWs) import System.Exit (ExitCode(..), exitSuccess, exitWith) import System.IO (stderr, hPutStrLn) -import Cidr (Cidr(..), - cidr_from_string, - combine_all, - enumerate, - max_octet1, - max_octet2, - max_octet3, - max_octet4, - min_octet1, - min_octet2, - min_octet3, - min_octet4 ) - -import CommandLine (help_set, - help_text, - input_function, - Mode(..), - parse_errors, - parse_mode) - +import Cidr ( + Cidr(..), + cidr_from_string, + combine_all, + enumerate, + max_octet1, + max_octet2, + max_octet3, + max_octet4, + min_octet1, + min_octet2, + min_octet3, + min_octet4 ) +import CommandLine ( + help_set, + help_text, + input_function, + Mode(..), + parse_errors, + parse_mode ) import DNS (Domain, lookup_ptrs) -import ExitCodes -import Octet +import ExitCodes ( exit_args_parse_failed, exit_invalid_cidr ) +import Octet () -- | A regular expression that matches a non-address character. @@ -63,14 +66,14 @@ cidr_to_regex cidr = range2 = numeric_range min2 max2 range3 = numeric_range min3 max3 range4 = numeric_range min4 max4 - min1 = octet_to_int (min_octet1 cidr) - min2 = octet_to_int (min_octet2 cidr) - min3 = octet_to_int (min_octet3 cidr) - min4 = octet_to_int (min_octet4 cidr) - max1 = octet_to_int (max_octet1 cidr) - max2 = octet_to_int (max_octet2 cidr) - max3 = octet_to_int (max_octet3 cidr) - max4 = octet_to_int (max_octet4 cidr) + min1 = fromEnum (min_octet1 cidr) + min2 = fromEnum (min_octet2 cidr) + min3 = fromEnum (min_octet3 cidr) + min4 = fromEnum (min_octet4 cidr) + max1 = fromEnum (max_octet1 cidr) + max2 = fromEnum (max_octet2 cidr) + max3 = fromEnum (max_octet3 cidr) + max4 = fromEnum (max_octet4 cidr)