InteractionTasks.icl 615 Bytes
Newer Older
1
implementation module iTasks.Extensions.Distributed.InteractionTasks
2

3
import iTasks
4

5 6
viewSharedInformation :: [ViewOption r] !(sds () r w) -> Task r | iTask r & iTask w & RWShared sds
viewSharedInformation options share
7 8
        = watch share
        >>* [OnValue (hasValue return)]
9
        >>- \v -> loop v options share
10
where
11 12 13
        loop :: r [ViewOption r] (sds () r w) -> Task r | iTask r & iTask w & RWShared sds
        loop v options share
                = (viewInformation options v)
14
                ||- (watch share >>* [OnValue (ifValue ((=!=) v) return)])
15
                >>- \v -> loop v options share