From 5dfa745cdb17b4b7bc84cf11e5d4b5ac19b65248 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Tue, 7 Apr 2020 15:59:30 +0200 Subject: Use ClientError from servant-client >= 0.16 --- lib/Web/OpenWeatherMap/Client.hs | 4 ++-- openweathermap.cabal | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Web/OpenWeatherMap/Client.hs b/lib/Web/OpenWeatherMap/Client.hs index c3611ee..758ee8f 100644 --- a/lib/Web/OpenWeatherMap/Client.hs +++ b/lib/Web/OpenWeatherMap/Client.hs @@ -7,7 +7,7 @@ module Web.OpenWeatherMap.Client ( ) where import Network.HTTP.Client (newManager, defaultManagerSettings) -import Servant.Client (BaseUrl(BaseUrl), ClientEnv, mkClientEnv, ClientM, Scheme(Http), ServantError, runClientM) +import Servant.Client (BaseUrl(BaseUrl), ClientEnv, mkClientEnv, ClientM, Scheme(Http), ClientError, runClientM) import Web.OpenWeatherMap.Types.CurrentWeather (CurrentWeather) import qualified Web.OpenWeatherMap.API as API @@ -24,7 +24,7 @@ data Location getWeather :: String -- ^ API key. -> Location - -> IO (Either ServantError CurrentWeather) + -> IO (Either ClientError CurrentWeather) getWeather appid loc = defaultEnv >>= runClientM (api loc appid) diff --git a/openweathermap.cabal b/openweathermap.cabal index 4565f71..8ba748f 100644 --- a/openweathermap.cabal +++ b/openweathermap.cabal @@ -30,7 +30,7 @@ library , aeson , http-client , servant - , servant-client >= 0.13 + , servant-client >= 0.16 exposed-modules: Web.OpenWeatherMap.API Web.OpenWeatherMap.Client -- cgit v1.2.3