ushalow
[clean-tests.git] / old / iTasks-notifications / test.icl
1 module test
2
3 import Data.Tuple
4 import iTasks
5 import iTasks.Internal.SDS
6 import iTasks.Internal.Task
7
8 Start w = startEngine t w
9
10 t = (watch (sdsFocus True s) >&> \sh->viewSharedInformation "s" [] sh @! "")/* updateSharedInformation "True" [] (sdsFocus True s)*/
11 -||- forever (
12 ((mkInstantTask \tid iw->appFst Ok (listAllSDSRegistrations iw)) @ formatSDSRegistrationsList)
13 >>* [OnAction (Action "Refresh") (withValue (Just o viewInformation "regs" []))])
14 /*
15 -||- viewSharedInformation "True" [] (sdsFocus True s)
16 -||- updateSharedInformation "False" [] (sdsFocus False s)
17 -||- viewSharedInformation "False" [] (sdsFocus False s)*/
18
19 s = fnot (sharedStore "someShare" 42)
20
21 fnot :: ((SDS () r w) -> (SDS Bool r w)) | TC r & TC w
22 fnot = sdsLens "caremuch" (\_->())
23 (SDSRead \p rs ->Ok rs)
24 (SDSWrite \p rs w ->Ok (Just w))
25 (SDSNotify \p1 rs w p2->p1)
26