repos / handle-examples.hs.git


handle-examples.hs.git / simple / domain
Evgenii Akentev  ·  2021-01-07

WeatherProvider.hs

 1module WeatherProvider where
 2
 3type Temperature = Int
 4data WeatherData = WeatherData { temperature :: Temperature }
 5
 6type Location = String
 7type Day = String
 8
 9-- | This is some concrete implementation.
10-- In this example we return a constant value.
11getWeatherData :: Location -> Day -> IO WeatherData
12getWeatherData _ _ = return $ WeatherData 30