module test
+import Debug.Trace
import iTasks
import iTasks.Extensions.DateTime
import iTasks.UI.Layout.Minimal
-Start w = doTasksWithOptions opt p2 w
+Start w = doTasksWithOptions opt w2 w
where
t :: Task DateTime
t = waitForTimer 7
t7 :: Int -> Task Int
t7 i = viewInformation () [] i >>= \x->t7 (x + 1)
+ t8 = viewInformation () [] 1
+ >>= \_->(viewInformation () [] 2
+ >>= \_->viewInformation () [] 3
+ >>= \_->viewInformation () [] 4)
+
p = parallel [(Embedded, \_->waitForTimer 5)] []
p1 = waitForTimer 5 -||- waitForTimer 10
p2 = withShared 3 \sh->watch sh
+ w1 = withShared 0 \sds -> (watch sds @? trace_stdout) -&&- updateInformation () [] 0 -&&- updateSharedInformation () [] sds
+
+ w2 = withShared 0 \sds ->
+ updateSharedInformation () [] sds
+ -&&- (whileUnchanged sds (viewInformation () []) @? trace_stdout)
+
+ w3 = forever (viewInformation () [] 32) @? trace_stdout
+
opt args eo = Ok eo
// opt args eo = Ok {eo & autoLayout=False}