]> gitweb.michael.orlitzky.com - email-validator.git/blobdiff - src/CommandLine.hs
Use a hyphen instead of an underscore in the program name.
[email-validator.git] / src / CommandLine.hs
index 1088f2a906a2d2055143f1c0b2036f039fb0155c..a7507df6a381a5365e7328aa8c3333158fac4c6b 100644 (file)
@@ -17,7 +17,8 @@ import ExitCodes
 
 -- We optionally accept input/output files to use instead of
 -- stdin/stdout.
-data Args = Args { input_file :: Maybe FilePath,
+data Args = Args { accept_a :: Bool,
+                   input_file :: Maybe FilePath,
                    output_file :: Maybe FilePath }
   deriving   (Show, Data, Typeable)
 
@@ -30,6 +31,10 @@ program_name = "email-validator"
 my_summary :: String
 my_summary = program_name ++ "-" ++ (showVersion version)
 
+accept_a_help :: String
+accept_a_help =
+  "Accept an 'A' record for the domain instead of requiring an MX record."
+
 input_file_help :: String
 input_file_help =
   "Path to the input file (default: stdin), one email address per line"
@@ -41,7 +46,8 @@ output_file_help =
 arg_spec :: Mode (CmdArgs Args)
 arg_spec =
   cmdArgsMode $
-    Args { input_file  = def &= typFile &= help input_file_help,
+    Args { accept_a    = def &=            help accept_a_help,
+           input_file  = def &= typFile &= help input_file_help,
            output_file = def &= typFile &= help output_file_help }
       &= program program_name
       &= summary my_summary