X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FMain.hs;h=374981248fd9bf2b17905175949914d89cea70e4;hb=95e23e65db31cf51c9f207a6b447da19920ee1a1;hp=415517f323612e40bd5ef45490f73cb674e9abab;hpb=64be4aa68a3ec03f318ff93af3ce9566795a993a;p=dead%2Fhtsn.git diff --git a/src/Main.hs b/src/Main.hs index 415517f..3749812 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -36,18 +36,14 @@ import ExitCodes ( exit_no_feed_hosts, exit_no_password, exit_no_username ) -import FeedHosts (FeedHosts(..)) import qualified OptionalConfiguration as OC ( OptionalConfiguration(..), from_rc ) -import Terminal (hPutRedLn, putGreenLn) +import Terminal (putGreenLn, report_error) +import TSN.FeedHosts (FeedHosts(..)) import TSN.Xml (parse_xmlfid, xml_prologue) -report_error :: String -> IO () -report_error = hPutRedLn stderr - - recv_line :: Handle -> IO String recv_line h = do line <- hGetLine h @@ -56,7 +52,7 @@ recv_line h = do save_document :: Configuration -> String -> IO () -save_document cfg doc = do +save_document cfg doc = case maybe_path of Nothing -> report_error "ERROR: document missing XML_File_ID element."