]> gitweb.michael.orlitzky.com - hath.git/blobdiff - src/CommandLine.hs
Fix four compiler warnings.
[hath.git] / src / CommandLine.hs
index f15a786c9089de96d7655bac2270dc1270aae26c..68957b1c4d2e4cf9fb19d10762fdfc870348417c 100644 (file)
@@ -21,11 +21,12 @@ lowercase :: String -> String
 lowercase = map toLower
 
 
--- The application currently has two modes. The default, Regex, will
+-- The application currently has four modes. The default, Regex, will
 -- compute a regular expression matching the input CIDRs. Reduce, on
 -- the other hand, will combine any redundant/adjacent CIDR blocks
--- into one.
-data Mode = Regex | Reduce
+-- into one. Dupe will show you what would be removed by Reduce, and
+-- Diff will show both additions and deletions in a diff-like format.
+data Mode = Regex | Reduce | Dupe | Diff
 
 
 -- A record containing values for all available options.
@@ -71,7 +72,7 @@ set_input arg opts = do
 
 -- The usage header
 usage :: String
-usage = "Usage: hath [regexed|reduced] [-h] [-i FILE]"
+usage = "Usage: hath [regexed|reduced|duped|diffed] [-h] [-i FILE]"
 
 
 -- The usage header, and all available flags (as generated by GetOpt)
@@ -110,6 +111,10 @@ parse_mode = do
         "regexed" -> return Regex
         "reduce"  -> return Reduce
         "reduced" -> return Reduce
+        "dupe"    -> return Dupe
+        "duped"   -> return Dupe
+        "diff"    -> return Diff
+        "diffed"  -> return Diff
         _         -> return Regex