X-Git-Url: http://gitweb.michael.orlitzky.com/?p=haeredes.git;a=blobdiff_plain;f=src%2FMain.hs;h=4da383352360ee4a37a552805a5da88897c27c4f;hp=0c215b758a59501b6d4c8bd049a5dd4cab53e9ee;hb=7d54d3e3e239342eae8b7fda5f5e4fb43adbbde8;hpb=fa4220513eb9d2036c3db0cc9c518c6346050318 diff --git a/src/Main.hs b/src/Main.hs index 0c215b7..4da3833 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -4,6 +4,7 @@ where import Control.Concurrent.ParallelIO.Global ( parallel, stopGlobalPool ) +import Control.Monad (unless) import qualified Data.ByteString.Char8 as BS ( getContents, pack, @@ -30,12 +31,11 @@ report :: (Domain, Maybe [Domain]) -> IO () report (d, Nothing) = putStrLn $ "Domain " ++ (show d) ++ " not delegated." report (d, Just leftovers) = - if null leftovers - then return () - else putStrLn $ "Domain " ++ - (show d) ++ - " delegates somewhere else: " ++ - (join " " (map show leftovers)) + unless (null leftovers) $ + putStrLn $ "Domain " ++ + (show d) ++ + " delegates somewhere else: " ++ + (join " " (map show leftovers)) clean :: [Domain] -- ^ List of delegates, @ds@ -> LookupResult