]> gitweb.michael.orlitzky.com - dead/halcyon.git/blobdiff - src/Mail.hs
Fix remaining hlint suggestions.
[dead/halcyon.git] / src / Mail.hs
index 8c1f25c89874eae68547f8323387b6116223419e..db5673f62c84bef2964e2e1cb4fb188ec3d43a49 100644 (file)
@@ -5,6 +5,7 @@ where
 
 import Control.Concurrent
 import Control.Exception (evaluate)
 
 import Control.Concurrent
 import Control.Exception (evaluate)
+import Control.Monad (liftM)
 import Data.List (intercalate)
 import Data.Time (formatTime, getZonedTime)
 import System.Exit
 import Data.List (intercalate)
 import Data.Time (formatTime, getZonedTime)
 import System.Exit
@@ -62,9 +63,9 @@ pad_left str n
 -- | Constructs a 'String' in RFC822 date format for the current
 --   date/time.
 rfc822_now :: IO String
 -- | Constructs a 'String' in RFC822 date format for the current
 --   date/time.
 rfc822_now :: IO String
-rfc822_now = do
-  date <- getZonedTime
-  return $ formatTime defaultTimeLocale rfc822DateFormat date
+rfc822_now =
+  liftM (formatTime defaultTimeLocale rfc822DateFormat) getZonedTime
+
 
 
 
 
 
 
@@ -100,7 +101,7 @@ sendmail sendmail_path message = do
 -- errors, and exit codes.  This function pretty-prints one of those
 -- three-tuples.
 print_sendmail_result :: (String, String, ExitCode) -> IO ()
 -- errors, and exit codes.  This function pretty-prints one of those
 -- three-tuples.
 print_sendmail_result :: (String, String, ExitCode) -> IO ()
-print_sendmail_result (outs, errs, ec) = do
+print_sendmail_result (outs, errs, ec) =
   case ec of
     ExitSuccess -> return ()
     _ -> putStrLn $ concat ["Output: " ++ outs,
   case ec of
     ExitSuccess -> return ()
     _ -> putStrLn $ concat ["Output: " ++ outs,