import Text.Parsec ( ParseError, parse )
import System.Console.CmdArgs ( def )
import System.Exit ( exitSuccess, exitWith, ExitCode (ExitFailure) )
-import System.IO ( hPutStrLn, stderr )
+import System.IO ( hPrint, stderr )
import CommandLine ( get_args )
import Configuration ( Configuration(..), merge_optional )
case (parse_lists $ lists cfg) of
Left e -> do
- hPutStrLn stderr (show e)
+ hPrint stderr e
exitWith (ExitFailure exit_unparseable_list)
- Right ls -> do
+ Right ls ->
case (parse_hosts $ hosts cfg) of
Left e -> do
- hPutStrLn stderr (show e)
+ hPrint stderr e
exitWith (ExitFailure exit_unparseable_host)
Right hs -> do
listings <- concatMapM (lookup_rbl ls) hs