]> gitweb.michael.orlitzky.com - hath.git/blobdiff - src/Main.hs
Added the 'Dupe' mode of operation.
[hath.git] / src / Main.hs
index 7017a191b85530f639b822acd19b5143fb8cf5ee..a3b1bfe4a811faad00f6e8503b58de540bd8703f 100644 (file)
@@ -1,4 +1,4 @@
-import Data.List (intercalate, intersperse)
+import Data.List ((\\), intercalate, intersperse)
 import System.Exit (ExitCode(..), exitWith)
 import System.IO (stderr, hPutStrLn)
 
@@ -125,3 +125,8 @@ main = do
     Reduce -> do
         mapM (putStrLn . show) (combine_all cidrs)
         return ()
+    Dupe -> do
+         mapM (putStrLn . show) dupes
+         return ()
+         where
+           dupes = cidrs \\ (combine_all cidrs)