]> gitweb.michael.orlitzky.com - dead/halcyon.git/blobdiff - src/Main.hs
Move the exit code into its own module.
[dead/halcyon.git] / src / Main.hs
index 8c2f20bffeea26dff632baf8519d39ca50b8cf99..ac33b2bdc654ffe143e7aeaa548fc93413d64f63 100644 (file)
@@ -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.