aboutsummaryrefslogtreecommitdiff
path: root/lib/Web/OpenWeatherMap/Client.hs
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2020-04-23 13:37:51 +0200
committerIgor Pashev <pashev.igor@gmail.com>2020-04-23 13:37:51 +0200
commite7a5255ed66162cebea785af30d3b534649ab24b (patch)
tree84f206d12df28466fc4de96ea8805e5f1286c706 /lib/Web/OpenWeatherMap/Client.hs
parent9c9cd8bf92bc6276811c38a0f9cedb0815af7add (diff)
downloadopenweathermap-e7a5255ed66162cebea785af30d3b534649ab24b.tar.gz
Make required all the query parameters
Diffstat (limited to 'lib/Web/OpenWeatherMap/Client.hs')
-rw-r--r--lib/Web/OpenWeatherMap/Client.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Web/OpenWeatherMap/Client.hs b/lib/Web/OpenWeatherMap/Client.hs
index 445e2a4..d760812 100644
--- a/lib/Web/OpenWeatherMap/Client.hs
+++ b/lib/Web/OpenWeatherMap/Client.hs
@@ -35,8 +35,8 @@ getWeather ::
-> IO (Either ClientError CurrentWeather)
getWeather appid loc = defaultEnv >>= runClientM (api loc appid)
where
- api (Name city) = API.weatherByName (Just city) . Just
- api (Coord lat lon) = API.weatherByCoord (Just lat) (Just lon) . Just
+ api (Name city) = API.weatherByName city
+ api (Coord lat lon) = API.weatherByCoord lat lon
-- | Make a request to OpenWeatherMap API
-- and return forecast weather in given location.
@@ -46,8 +46,8 @@ getForecast ::
-> IO (Either ClientError ForecastWeather)
getForecast appid loc = defaultEnv >>= runClientM (api loc appid)
where
- api (Name city) = API.forecastByName (Just city) . Just
- api (Coord lat lon) = API.forecastByCoord (Just lat) (Just lon) . Just
+ api (Name city) = API.forecastByName city
+ api (Coord lat lon) = API.forecastByCoord lat lon
defaultEnv :: IO ClientEnv
defaultEnv = do