X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fhalcyon.git;a=blobdiff_plain;f=src%2FCommandLine.hs;h=19b8d1b39a8dd3971624b6923091f6d92f96d97f;hp=c5ddb4b48a002213631cbdb32d0f91596a399db1;hb=94484087fbfe98d6735aa82798a9bf506f97fd19;hpb=17dd116706c4a971e1f5c68daa1656af5eff5cd2 diff --git a/src/CommandLine.hs b/src/CommandLine.hs index c5ddb4b..19b8d1b 100644 --- a/src/CommandLine.hs +++ b/src/CommandLine.hs @@ -45,7 +45,7 @@ options = Option ['t'][] (ReqArg set_to "email_address") "Send tweets TO email_address.", Option ['f'][] (ReqArg set_from "email_address") "Send tweets FROM email_address." ] - + set_help :: Options -> IO Options set_help opts = do @@ -58,7 +58,7 @@ set_to arg opts = do set_from :: String -> Options -> IO Options set_from arg opts = do return opts { opt_from = Just arg } - + -- The usage header. usage :: String @@ -120,7 +120,7 @@ format_error err = "ERROR: " ++ err ++ "\n" parse_errors :: IO [String] parse_errors = do argv <- getArgs - let (_, _, errors) = getOpt Permute options argv + let (_, _, errors) = getOpt Permute options argv errs_username <- username_errors errs_to <- to_errors errs_from <- from_errors @@ -143,7 +143,7 @@ from_email_address = do opts <- parse_options return (opt_from opts) - + parse_usernames :: IO [String] parse_usernames = do argv <- getArgs