]> gitweb.michael.orlitzky.com - spline3.git/blobdiff - src/ExitCodes.hs
Use cmdargs to parse command-line arguments.
[spline3.git] / src / ExitCodes.hs
diff --git a/src/ExitCodes.hs b/src/ExitCodes.hs
new file mode 100644 (file)
index 0000000..47cd15c
--- /dev/null
@@ -0,0 +1,15 @@
+-- | All failure exit codes that the program can return.
+module ExitCodes
+where
+
+-- | Indicates that the command-line arguments could not be parsed.
+exit_arg_parse_failed :: Int
+exit_arg_parse_failed = 1
+
+-- | One of the arguments that should be positive wasn't.
+exit_arg_not_positive :: Int
+exit_arg_not_positive = 2
+
+-- | One of the arguments wasn't within the allowable bounds.
+exit_arg_out_of_bounds :: Int
+exit_arg_out_of_bounds = 3