From 30ef4e15705eb9f539aee81417f67ce5a2825af5 Mon Sep 17 00:00:00 2001 From: Victor Denisov Date: Wed, 1 Jan 2020 17:38:13 -0800 Subject: [PATCH] Fix compilation error --- Database/MongoDB/Internal/Network.hs | 4 ++-- mongoDB.cabal | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Database/MongoDB/Internal/Network.hs b/Database/MongoDB/Internal/Network.hs index 802b1a7..7f9084e 100644 --- a/Database/MongoDB/Internal/Network.hs +++ b/Database/MongoDB/Internal/Network.hs @@ -79,9 +79,9 @@ lookupSeedList :: N.HostName -> IO [Host] -- ^ Retrieves the replica set seed list from the SRV DNS record for the given hostname lookupSeedList hostname = do rs <- makeResolvSeed defaultResolvConf - res <- withResolver rs $ \resolver -> lookupSRV resolver $ "_mongodb._tcp." ++ pack hostname + res <- withResolver rs $ \resolver -> lookupSRV resolver $ pack $ "_mongodb._tcp." ++ hostname case res of Left _ -> pure [] Right srv -> pure $ map (\(_, _, por, tar) -> let tar' = dropWhileEnd (=='.') (unpack tar) - in Host tar' (PortNumber . fromIntegral $ por)) srv \ No newline at end of file + in Host tar' (PortNumber . fromIntegral $ por)) srv diff --git a/mongoDB.cabal b/mongoDB.cabal index 29e6b39..8a5717e 100644 --- a/mongoDB.cabal +++ b/mongoDB.cabal @@ -129,7 +129,11 @@ Benchmark bench , lifted-base >= 0.1.0.3 , transformers-base >= 0.4.1 , hashtables >= 1.1.2.0 + , fail + , dns + , http-types , criterion + , tls >= 1.3.0 if flag(_old-network) -- "Network.BSD" is only available in network < 2.9