]> gitweb.michael.orlitzky.com - dead/halcyon.git/commitdiff
Clean up compiler warnings.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 25 Oct 2010 06:28:17 +0000 (02:28 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 25 Oct 2010 06:28:17 +0000 (02:28 -0400)
src/Mail.hs
src/Main.hs
src/Twitter/Xml.hs

index c93a6cff2e9cc53e11e96e9b0e4c36f7733b17fd..7f0fd8ba805049aa51371e0a0440fc12fb2523b5 100644 (file)
@@ -4,7 +4,6 @@ module Mail
 where
 
 import Control.Concurrent
 where
 
 import Control.Concurrent
-import Control.Concurrent.MVar
 import Control.Exception (evaluate)
 import Data.List (intercalate)
 import System.Exit
 import Control.Exception (evaluate)
 import Data.List (intercalate)
 import System.Exit
@@ -122,9 +121,9 @@ sendmail message = do
   errm <- newEmptyMVar
   errs <- hGetContents errh
 
   errm <- newEmptyMVar
   errs <- hGetContents errh
 
-  forkIO $ hPutStr inh (show message) >> hClose inh
-  forkIO $ evaluate (length outs) >> putMVar outm ()
-  forkIO $ evaluate (length errs) >> putMVar errm ()
+  _ <- forkIO $ hPutStr inh (show message) >> hClose inh
+  _ <- forkIO $ evaluate (length outs) >> putMVar outm ()
+  _ <- forkIO $ evaluate (length errs) >> putMVar errm ()
 
   readMVar outm
   readMVar errm
 
   readMVar outm
   readMVar errm
index de209899bfedfb9611b269e21e8693b00f4aa79b..f6fd170ed1c2073827e33522b675747581b9af83 100644 (file)
@@ -58,7 +58,7 @@ recurse username latest_status_id maybe_message = do
         recurse username latest_status_id maybe_message
       _ -> do
         let new_latest_status_id = get_max_status_id new_statuses
         recurse username latest_status_id maybe_message
       _ -> do
         let new_latest_status_id = get_max_status_id new_statuses
-        mapM (putStrLn . pretty_print) new_statuses
+        _ <- mapM (putStrLn . pretty_print) new_statuses
 
         case maybe_message of
           Nothing -> do
 
         case maybe_message of
           Nothing -> do
@@ -68,7 +68,7 @@ recurse username latest_status_id maybe_message = do
              date_header <- construct_date_header
              let messages = map (message_from_status message (date_header)) new_statuses
              sendmail_results <- mapM sendmail messages
              date_header <- construct_date_header
              let messages = map (message_from_status message (date_header)) new_statuses
              sendmail_results <- mapM sendmail messages
-             mapM print_sendmail_result sendmail_results
+             _ <- mapM print_sendmail_result sendmail_results
              recurse username new_latest_status_id maybe_message
              return ()
 
              recurse username new_latest_status_id maybe_message
              return ()
 
@@ -145,9 +145,9 @@ main = do
                                             from = fromaddr })
 
   -- Execute run_twat on each username in a new thread.
                                             from = fromaddr })
 
   -- Execute run_twat on each username in a new thread.
-  mapM (forkIO . (run_twat message)) usernames
+  _ <- mapM (forkIO . (run_twat message)) usernames
 
 
-  forever $ do
+  _ <- forever $ do
     -- This thread (the one executing main) doesn't do anything,
     -- but when it terminates, so do all the threads we forked.
     -- As a result, we need to keep this thread on life support.
     -- This thread (the one executing main) doesn't do anything,
     -- but when it terminates, so do all the threads we forked.
     -- As a result, we need to keep this thread on life support.
index b34c6fbae94c4ca8629eec48ad849becb98c23e8..8ffd9dd57196e1aeebac59d4bd4bab250ff766bc 100644 (file)
@@ -2,7 +2,6 @@
 module Twitter.Xml
 where
 
 module Twitter.Xml
 where
 
-import Data.Maybe
 import Test.HUnit
 import Text.Regex (mkRegex, subRegex)
 import Text.XML.HaXml
 import Test.HUnit
 import Text.Regex (mkRegex, subRegex)
 import Text.XML.HaXml