from Data.Func import $
import Data.Tuple
+import StdDebug
+
memoryShare :: String a -> Shared a | iTask a
memoryShare s d = sdsFocus s $ memoryStore s $ Just d
| ident == -1 = (merr $> const True, iw)
= case find ((==)dev) w of
Nothing = (Error $ exception "Device doesn't exist anymore", iw)
- Just {deviceShares} = case find (\{identifier}->identifier == ident) deviceShares of
+ Just {deviceShares} = case find (\d->d.identifier == ident) deviceShares of
Nothing = (Error $ exception $ "deviceStore: Share doesn't exist: " +++ toString ident, iw)
- Just s = case sendMessagesIW [MTUpd ident s.MTaskShare.value] dev iw of
+ Just s
+ | not $ trace_tn "Really sending a message from a share update" = undef
+ = case sendMessagesIW [MTUpd ident s.MTaskShare.value] dev iw of
(Error e, iw) = (Error e, iw)
(Ok _, iw) = (Ok $ lens mi, iw)