aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Web/OpenWeatherMap/Types/City.hs18
-rw-r--r--lib/Web/OpenWeatherMap/Types/Clouds.hs8
-rw-r--r--lib/Web/OpenWeatherMap/Types/Coord.hs10
-rw-r--r--lib/Web/OpenWeatherMap/Types/CurrentWeather.hs28
-rw-r--r--lib/Web/OpenWeatherMap/Types/Forecast.hs16
-rw-r--r--lib/Web/OpenWeatherMap/Types/ForecastWeather.hs10
-rw-r--r--lib/Web/OpenWeatherMap/Types/Main.hs20
-rw-r--r--lib/Web/OpenWeatherMap/Types/Sys.hs12
-rw-r--r--lib/Web/OpenWeatherMap/Types/Weather.hs14
-rw-r--r--lib/Web/OpenWeatherMap/Types/Wind.hs10
10 files changed, 83 insertions, 63 deletions
diff --git a/lib/Web/OpenWeatherMap/Types/City.hs b/lib/Web/OpenWeatherMap/Types/City.hs
index bb6cd6d..4ca30bd 100644
--- a/lib/Web/OpenWeatherMap/Types/City.hs
+++ b/lib/Web/OpenWeatherMap/Types/City.hs
@@ -11,11 +11,13 @@ import Data.Aeson (FromJSON)
import Web.OpenWeatherMap.Types.Coord (Coord)
-data City = City
- { name :: String
- , country :: Maybe String
- , coord :: Coord
- , timezone :: Int
- , sunset :: Int
- , sunrise :: Int
- } deriving (Show, Generic, FromJSON)
+data City =
+ City
+ { name :: String
+ , country :: Maybe String
+ , coord :: Coord
+ , timezone :: Int
+ , sunset :: Int
+ , sunrise :: Int
+ }
+ deriving (Show, Generic, FromJSON)
diff --git a/lib/Web/OpenWeatherMap/Types/Clouds.hs b/lib/Web/OpenWeatherMap/Types/Clouds.hs
index 4aec757..f1b8e1e 100644
--- a/lib/Web/OpenWeatherMap/Types/Clouds.hs
+++ b/lib/Web/OpenWeatherMap/Types/Clouds.hs
@@ -9,6 +9,8 @@ import GHC.Generics (Generic)
import Data.Aeson (FromJSON)
-data Clouds = Clouds
- { all :: Double
- } deriving (Show, Generic, FromJSON)
+data Clouds =
+ Clouds
+ { all :: Double
+ }
+ deriving (Show, Generic, FromJSON)
diff --git a/lib/Web/OpenWeatherMap/Types/Coord.hs b/lib/Web/OpenWeatherMap/Types/Coord.hs
index 0751964..148564a 100644
--- a/lib/Web/OpenWeatherMap/Types/Coord.hs
+++ b/lib/Web/OpenWeatherMap/Types/Coord.hs
@@ -9,7 +9,9 @@ import GHC.Generics (Generic)
import Data.Aeson (FromJSON)
-data Coord = Coord
- { lon :: Maybe Double
- , lat :: Maybe Double
- } deriving (Show, Generic, FromJSON)
+data Coord =
+ Coord
+ { lon :: Maybe Double
+ , lat :: Maybe Double
+ }
+ deriving (Show, Generic, FromJSON)
diff --git a/lib/Web/OpenWeatherMap/Types/CurrentWeather.hs b/lib/Web/OpenWeatherMap/Types/CurrentWeather.hs
index e7d4464..02d3371 100644
--- a/lib/Web/OpenWeatherMap/Types/CurrentWeather.hs
+++ b/lib/Web/OpenWeatherMap/Types/CurrentWeather.hs
@@ -19,16 +19,18 @@ import Web.OpenWeatherMap.Types.Wind (Wind)
-- | Response to requests for current weather.
-- Refer to <https://openweathermap.org/current>.
-data CurrentWeather = CurrentWeather
- { coord :: Coord
- , weather :: [Weather]
- , base :: String
- , main :: Main
- , wind :: Wind
- , clouds :: Clouds
- , dt :: Int
- , sys :: Sys
- , id :: Int
- , name :: String
- , cod :: Int
- } deriving (Show, Generic, FromJSON)
+data CurrentWeather =
+ CurrentWeather
+ { coord :: Coord
+ , weather :: [Weather]
+ , base :: String
+ , main :: Main
+ , wind :: Wind
+ , clouds :: Clouds
+ , dt :: Int
+ , sys :: Sys
+ , id :: Int
+ , name :: String
+ , cod :: Int
+ }
+ deriving (Show, Generic, FromJSON)
diff --git a/lib/Web/OpenWeatherMap/Types/Forecast.hs b/lib/Web/OpenWeatherMap/Types/Forecast.hs
index 3434930..b110468 100644
--- a/lib/Web/OpenWeatherMap/Types/Forecast.hs
+++ b/lib/Web/OpenWeatherMap/Types/Forecast.hs
@@ -14,10 +14,12 @@ import Web.OpenWeatherMap.Types.Main (Main)
import Web.OpenWeatherMap.Types.Weather (Weather)
import Web.OpenWeatherMap.Types.Wind (Wind)
-data Forecast = Forecast
- { dt :: Int
- , clouds :: Clouds
- , main :: Main
- , weather :: [Weather]
- , wind :: Wind
- } deriving (Show, Generic, FromJSON)
+data Forecast =
+ Forecast
+ { dt :: Int
+ , clouds :: Clouds
+ , main :: Main
+ , weather :: [Weather]
+ , wind :: Wind
+ }
+ deriving (Show, Generic, FromJSON)
diff --git a/lib/Web/OpenWeatherMap/Types/ForecastWeather.hs b/lib/Web/OpenWeatherMap/Types/ForecastWeather.hs
index fa8e50a..f4616e5 100644
--- a/lib/Web/OpenWeatherMap/Types/ForecastWeather.hs
+++ b/lib/Web/OpenWeatherMap/Types/ForecastWeather.hs
@@ -14,7 +14,9 @@ import Web.OpenWeatherMap.Types.Forecast (Forecast)
-- | Response to requests for forecast weather.
-- Refer to <https://openweathermap.org/forecast5>.
-data ForecastWeather = ForecastWeather
- { list :: [Forecast]
- , city :: City
- } deriving (Show, Generic, FromJSON)
+data ForecastWeather =
+ ForecastWeather
+ { list :: [Forecast]
+ , city :: City
+ }
+ deriving (Show, Generic, FromJSON)
diff --git a/lib/Web/OpenWeatherMap/Types/Main.hs b/lib/Web/OpenWeatherMap/Types/Main.hs
index 8ce3f7b..7bb62a6 100644
--- a/lib/Web/OpenWeatherMap/Types/Main.hs
+++ b/lib/Web/OpenWeatherMap/Types/Main.hs
@@ -11,12 +11,14 @@ import Data.Aeson (FromJSON)
{-# ANN module "HLint: ignore Use camelCase" #-}
-data Main = Main
- { temp :: Double
- , pressure :: Double
- , humidity :: Double
- , temp_min :: Double
- , temp_max :: Double
- , sea_level :: Maybe Double
- , grnd_level :: Maybe Double
- } deriving (Show, Generic, FromJSON)
+data Main =
+ Main
+ { temp :: Double
+ , pressure :: Double
+ , humidity :: Double
+ , temp_min :: Double
+ , temp_max :: Double
+ , sea_level :: Maybe Double
+ , grnd_level :: Maybe Double
+ }
+ deriving (Show, Generic, FromJSON)
diff --git a/lib/Web/OpenWeatherMap/Types/Sys.hs b/lib/Web/OpenWeatherMap/Types/Sys.hs
index b416e30..15ef6cd 100644
--- a/lib/Web/OpenWeatherMap/Types/Sys.hs
+++ b/lib/Web/OpenWeatherMap/Types/Sys.hs
@@ -9,8 +9,10 @@ import GHC.Generics (Generic)
import Data.Aeson (FromJSON)
-data Sys = Sys
- { country :: Maybe String
- , sunrise :: Int
- , sunset :: Int
- } deriving (Show, Generic, FromJSON)
+data Sys =
+ Sys
+ { country :: Maybe String
+ , sunrise :: Int
+ , sunset :: Int
+ }
+ deriving (Show, Generic, FromJSON)
diff --git a/lib/Web/OpenWeatherMap/Types/Weather.hs b/lib/Web/OpenWeatherMap/Types/Weather.hs
index 5df2c6e..4e31495 100644
--- a/lib/Web/OpenWeatherMap/Types/Weather.hs
+++ b/lib/Web/OpenWeatherMap/Types/Weather.hs
@@ -9,9 +9,11 @@ import GHC.Generics (Generic)
import Data.Aeson (FromJSON)
-data Weather = Weather
- { id :: Int
- , main :: String
- , description :: String
- , icon :: String
- } deriving (Show, Generic, FromJSON)
+data Weather =
+ Weather
+ { id :: Int
+ , main :: String
+ , description :: String
+ , icon :: String
+ }
+ deriving (Show, Generic, FromJSON)
diff --git a/lib/Web/OpenWeatherMap/Types/Wind.hs b/lib/Web/OpenWeatherMap/Types/Wind.hs
index 91a1b73..66a78ca 100644
--- a/lib/Web/OpenWeatherMap/Types/Wind.hs
+++ b/lib/Web/OpenWeatherMap/Types/Wind.hs
@@ -9,7 +9,9 @@ import GHC.Generics (Generic)
import Data.Aeson (FromJSON)
-data Wind = Wind
- { speed :: Double
- , deg :: Double
- } deriving (Show, Generic, FromJSON)
+data Wind =
+ Wind
+ { speed :: Double
+ , deg :: Double
+ }
+ deriving (Show, Generic, FromJSON)