From 90cffda98c3610faa1d01cecba7178bde365d80a Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Wed, 2 Dec 2020 15:19:07 +0100 Subject: [PATCH] . --- test.icl | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/test.icl b/test.icl index 4e45f55..ed64bbc 100644 --- a/test.icl +++ b/test.icl @@ -1,27 +1,19 @@ module test import iTasks +import Data.Func -:: OpenWeatherResponse = - { main :: OpenWeatherResponseMain - , weather :: [OpenWeatherResponseWeather] - } +Start w = doTasks t w +where + t = parallel + [(Embedded, \stl->tune (Title "New Task") $ addTask stl + >>* [OnAction (Action "Close") (always (return ()))]) + ] [] <<@ ArrangeWithTabs True -:: 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} + addTask :: (SharedTaskList ()) -> Task () + addTask stl + = (enterInformation [] <<@ Label "Title") -&&- updateInformation [] "text" + >>! \(title, text)->appendTask Embedded + (\_->tune (Title title) $ viewInformation [] text @? const NoValue) + stl + >-| addTask stl -- 2.20.1