X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fhalcyon.git;a=blobdiff_plain;f=src%2FMain.hs;fp=src%2FMain.hs;h=b4fd956f2114d1f3a32f2b6126572811aa603a20;hp=40703d7ea9170c10110efe3787ce070c47786256;hb=dd4abc21674b98bc55a3775291a8667dffec2863;hpb=93577603f6df06e4627ca13a6f5fe412b28dc817 diff --git a/src/Main.hs b/src/Main.hs index 40703d7..b4fd956 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -24,7 +24,7 @@ import Mail ( import Twitter.Http import Twitter.Status import Twitter.User - +import Usernames (Usernames(..)) -- | A wrapper around threadDelay which takes seconds instead of -- microseconds as its argument. @@ -205,7 +205,7 @@ main = do -- set in either the config file or on the command-line. let cfg = merge_optional default_config opt_config - when (null $ usernames cfg) $ do + when (null $ get_usernames (usernames cfg)) $ do hPutStrLn stderr "ERROR: no usernames supplied." _ <- show_help exitWith (ExitFailure exit_no_usernames) @@ -216,7 +216,7 @@ main = do -- Execute run_twat on each username in a new thread. let run_twat_curried = run_twat cfg message - _ <- mapM (forkIO . run_twat_curried) (usernames cfg) + _ <- mapM (forkIO . run_twat_curried) (get_usernames (usernames cfg)) _ <- forever $ -- This thread (the one executing main) doesn't do anything,