aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2020-04-07 15:59:30 +0200
committerIgor Pashev <pashev.igor@gmail.com>2020-04-07 15:59:30 +0200
commit5dfa745cdb17b4b7bc84cf11e5d4b5ac19b65248 (patch)
tree9d40d305b8b01f83f2d254689f4791eaaa9f537a /lib
parent1882add7df3ea1a77f893aaf1692e62df68e5093 (diff)
downloadopenweathermap-5dfa745cdb17b4b7bc84cf11e5d4b5ac19b65248.tar.gz
Use ClientError from servant-client >= 0.16
Diffstat (limited to 'lib')
-rw-r--r--lib/Web/OpenWeatherMap/Client.hs4
1 files changed, 2 insertions, 2 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)