From: Michael Orlitzky Date: Tue, 28 Sep 2010 20:55:53 +0000 (-0400) Subject: Move the exit code into its own module. X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fhalcyon.git;a=commitdiff_plain;h=53c26134670775854677470e402b8b41f19246d1 Move the exit code into its own module. --- diff --git a/src/ExitCodes.hs b/src/ExitCodes.hs new file mode 100644 index 0000000..b190489 --- /dev/null +++ b/src/ExitCodes.hs @@ -0,0 +1,8 @@ +-- |All exit codes that the program can return (excepting ExitSuccess). +-- There's only one, since the program will try/fail forever upon errors. +module ExitCodes +where + +-- |Indicates that the command-line arguments could not be parsed. +exit_args_parse_failed :: Int +exit_args_parse_failed = 1 diff --git a/src/Main.hs b/src/Main.hs index 84536d7..ac33b2b 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -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