uds
[clean-tests.git] / test.icl
index 367eccd..4e45f55 100644 (file)
--- a/test.icl
+++ b/test.icl
@@ -1,5 +1,27 @@
 module test
 
-import Data.Maybe
+import iTasks
 
-Start = isJust (?Just 42)
+:: OpenWeatherResponse =
+       { main :: OpenWeatherResponseMain
+       , weather :: [OpenWeatherResponseWeather]
+       }
+
+:: OpenWeatherResponseWeather =
+       { id :: Int
+       , main :: String
+       , description :: String
+       , icon :: String
+       }
+:: OpenWeatherResponseMain =
+       { temp :: Real
+       , pressure :: Int
+       , humidity :: Int
+       , temp_min :: Real
+       , temp_max :: Real
+       }
+
+derive class iTask OpenWeatherResponseMain, OpenWeatherResponseWeather, OpenWeatherResponse
+Start w = doTasks (viewInformation [] v <<@ Title "Weather in Nijmegen from openweather.com") w
+
+v = {temp=18.4, pressure=1050, humidity=60, temp_min=12.5, temp_max=24.1}