- up :: String MTaskShare -> MTaskShare
- up i s = {MTaskShare | s & withDevice = [wt\\wt<-s.withDevice|wt <> i]}
+ rr name iworld = case read deviceStore iworld of
+ (Error e, iworld) = (Error e, iworld)
+ (Ok devices, iworld) = case find ((==)dev) devices of
+ Nothing = (Error $ exception "Device doesn't exist anymore", iworld)
+ Just {deviceShares} = case find (\s->s.identifier == sdsi) deviceShares of
+ Nothing = (Error $ exception "Share doesn't exist", iworld)
+ Just share = (Ok share.MTaskShare.value, iworld)
+
+ // Also send messages
+ ww name value iworld = undef//case modify (modFun name value) sdsStore of
+// (Error e, iworld) = (Error e, iworld)
+// (Ok shares, iworld) = (Ok $ const True, iworld)