X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fhalcyon.git;a=blobdiff_plain;f=src%2FMain.hs;h=ac33b2bdc654ffe143e7aeaa548fc93413d64f63;hp=8c2f20bffeea26dff632baf8519d39ca50b8cf99;hb=53c26134670775854677470e402b8b41f19246d1;hpb=17dd116706c4a971e1f5c68daa1656af5eff5cd2 diff --git a/src/Main.hs b/src/Main.hs index 8c2f20b..ac33b2b 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -7,13 +7,12 @@ import System.Exit (ExitCode(..), exitWith) import System.IO (hPutStrLn, stderr) import CommandLine +import ExitCodes import Mail import Twitter.Http import Twitter.Status import Twitter.User -exit_args_parse_failed :: Int -exit_args_parse_failed = 1 -- The length of all calls to sleep, in seconds. heartbeat :: Int @@ -79,8 +78,8 @@ get_latest_status_id username = do run_twat :: Maybe Message -> String -> IO () -run_twat message username = do - latest_status_id <- get_latest_status_id username +run_twat message username = do + latest_status_id <- get_latest_status_id username recurse username latest_status_id message return () @@ -123,7 +122,7 @@ main = do -- Execute run_twat on each username in a new thread. mapM (forkIO . (run_twat message)) usernames - + forever $ do -- This thread (the one executing main) doesn't do anything, -- but when it terminates, so do all the threads we forked.