Drop support for building with old versions of dns and http-conduit.

This commit is contained in:
Joey Hess 2017-03-10 15:49:14 -04:00
parent fc3925a1cd
commit ca49a84ba5
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
4 changed files with 4 additions and 18 deletions

View file

@ -5,8 +5,6 @@
- License: BSD-2-clause
-}
{-# LANGUAGE CPP #-}
module Utility.SRV (
mkSRVTcp,
mkSRV,
@ -42,12 +40,7 @@ lookupSRV :: SRV -> IO [HostPort]
lookupSRV (SRV srv) = do
seed <- makeResolvSeed defaultResolvConf
r <- withResolver seed $ flip DNS.lookupSRV $ B8.fromString srv
return $
#if MIN_VERSION_dns(1,0,0)
either (const []) use r
#else
maybe [] use r
#endif
return $ either (const []) use r
where
use = orderHosts . map tohosts
tohosts (priority, weight, port, hostname) =