]> gitweb.michael.orlitzky.com - dead/halcyon.git/blobdiff - src/Main.hs
Rename the project to Halcyon.
[dead/halcyon.git] / src / Main.hs
index b4fd956f2114d1f3a32f2b6126572811aa603a20..c104874c9c7b026d45d0de5f71c817385eb145c8 100644 (file)
@@ -39,7 +39,7 @@ thread_sleep seconds = do
 -- /Date: / header, and returns the updated message.
 message_from_status :: Maybe TimeZone -> Message -> String -> Status -> Message
 message_from_status mtz message default_date status =
-  message { subject = "Twat: " ++ (screen_name (user status)),
+  message { subject = "Halcyon: " ++ (screen_name (user status)),
             body    = (pretty_print mtz status),
             headers = ((headers message) ++ ["Date: " ++ date])}
   where
@@ -166,8 +166,8 @@ get_latest_status_id cfg username = do
 --   recursive loop that checks for updates forever. The message
 --   argument is optional and is passed to recurse in case the updates
 --   should be emailed.
-run_twat :: Cfg -> Maybe Message -> String -> IO ()
-run_twat cfg msg username = do
+run :: Cfg -> Maybe Message -> String -> IO ()
+run cfg msg username = do
   latest_status_id <- get_latest_status_id cfg username
   recurse cfg username latest_status_id msg
   return ()
@@ -189,7 +189,7 @@ construct_message cfg = do
                              from = f }
 
 -- |The main function just parses the command-line arguments and then
--- forks off calls to 'run_twat' for each supplied username. After
+-- forks off calls to 'run' for each supplied username. After
 -- forking, main loops forever.
 main :: IO ()
 main = do
@@ -214,9 +214,9 @@ main = do
   -- message object to be passed to all of our threads.
   let message = construct_message cfg
 
-  -- Execute run_twat on each username in a new thread.
-  let run_twat_curried = run_twat cfg message
-  _ <- mapM (forkIO . run_twat_curried) (get_usernames (usernames cfg))
+  -- Execute run on each username in a new thread.
+  let run_curried = run cfg message
+  _ <- mapM (forkIO . run_curried) (get_usernames (usernames cfg))
 
   _ <- forever $
     -- This thread (the one executing main) doesn't do anything,