resolve_address )
where
-import Control.Monad ( liftM )
import qualified Data.ByteString.Char8 as BS ( pack )
import Data.IP (IPv4)
import Network.DNS (
--
lookupMX' :: Resolver -> Domain -> IO LookupResult
lookupMX' resolver domain =
- liftM (pair_em . drop_priority) $ lookupMX resolver domain
+ fmap (pair_em . drop_priority) $ lookupMX resolver domain
where
drop_priority :: Either DNSError [(Domain, Int)]
-> Either DNSError [Domain]
lookupNS' resolver domain = do
answer_result <- lookupNS resolver domain
auth_result <- lookupNSAuth resolver domain
- liftM pair_em $ return $ combine answer_result auth_result
+ fmap pair_em $ return $ combine answer_result auth_result
where
pair_em :: a -> (Domain, a)
pair_em = (,) domain
getContents,
pack,
words )
-import Data.List ( (\\), intersperse, sort )
+import Data.List ( (\\), intercalate, sort )
import Network.DNS (
DNSError(NameError),
Domain,
-- 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)
+ join delimiter strings = intercalate delimiter strings
main :: IO ()
results <- parallelInterleaved actions
-- Output the results.
- _ <- mapM (report nrml_delegates normalize_function) results
+ mapM_ (report nrml_delegates normalize_function) results
stopGlobalPool