.
[clean-tests.git] / test.icl
index 4e45f55..0093bb4 100644 (file)
--- a/test.icl
+++ b/test.icl
@@ -1,27 +1,18 @@
 module test
 
+//import Data.Func
 import iTasks
 
-:: 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}
+Start w = doTasks (onStartup par) w
+where
+       par :: Task [(Int, TaskValue ())]
+       par = parallel [] []
+//Start w = doTasks (onStartup $ m >>- traceValue) w
+//
+//m = parallel
+//     [(Embedded, \stl->return 42)]
+//     []
+//     [OnValue $ \tv->case tv of
+//             NoValue = ?None
+//             _ = ?None
+//     ]