]> gitweb.michael.orlitzky.com - dead/halcyon.git/commitdiff
Move the exit code into its own module.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 28 Sep 2010 20:55:53 +0000 (16:55 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 28 Sep 2010 20:55:53 +0000 (16:55 -0400)
src/ExitCodes.hs [new file with mode: 0644]
src/Main.hs

diff --git a/src/ExitCodes.hs b/src/ExitCodes.hs
new file mode 100644 (file)
index 0000000..b190489
--- /dev/null
@@ -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
index 84536d757e3389319f5edb875965b5871e053342..ac33b2bdc654ffe143e7aeaa548fc93413d64f63 100644 (file)
@@ -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