diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2020-04-07 15:59:30 +0200 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2020-04-07 15:59:30 +0200 |
commit | 5dfa745cdb17b4b7bc84cf11e5d4b5ac19b65248 (patch) | |
tree | 9d40d305b8b01f83f2d254689f4791eaaa9f537a | |
parent | 1882add7df3ea1a77f893aaf1692e62df68e5093 (diff) | |
download | openweathermap-5dfa745cdb17b4b7bc84cf11e5d4b5ac19b65248.tar.gz |
Use ClientError from servant-client >= 0.16
-rw-r--r-- | lib/Web/OpenWeatherMap/Client.hs | 4 | ||||
-rw-r--r-- | 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 |