From 53c26134670775854677470e402b8b41f19246d1 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 28 Sep 2010 16:55:53 -0400 Subject: [PATCH] Move the exit code into its own module. --- src/ExitCodes.hs | 8 ++++++++ src/Main.hs | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 src/ExitCodes.hs 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 -- 2.43.2