From: Michael Orlitzky Date: Sat, 2 Mar 2019 01:29:32 +0000 (-0500) Subject: src/Main.hs: inline MissingH "join" function to eliminate the dependency. X-Git-Tag: 0.5.1~15 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=a27c37544ae78ca3940987dfd7119e384422ff3b;p=haeredes.git src/Main.hs: inline MissingH "join" function to eliminate the dependency. --- diff --git a/haeredes.cabal b/haeredes.cabal index f29de3c..723fc07 100644 --- a/haeredes.cabal +++ b/haeredes.cabal @@ -85,7 +85,6 @@ executable haeredes cmdargs >= 0.10, dns >= 1.4, iproute >= 1.2, - MissingH >= 1.2, parallel-io >= 0.3 main-is: diff --git a/src/Main.hs b/src/Main.hs index f7a56ea..8178209 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -9,8 +9,7 @@ import qualified Data.ByteString.Char8 as BS ( getContents, pack, words ) -import Data.List ( (\\) ) -import Data.String.Utils (join) +import Data.List ( (\\), intersperse ) import Network.DNS ( Domain, FileOrNumericHost(RCHostName), @@ -72,6 +71,11 @@ report delgts normalize_function (d, Right raw_hosts) = do (show d) ++ " delegates somewhere else: " ++ (join " " (map show leftovers)) + where + -- Create one big string by joining together a list of smaller + -- strings and placing a delimiter between them. + join :: String -> [String] -> String + join delimiter strings = concat (intersperse delimiter strings) main :: IO ()