From: Mart Lubbers Date: Fri, 3 Mar 2017 08:44:56 +0000 (+0100) Subject: set instead of upd X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=f30142f32b5aec7e51200b6045014993c700b74a;p=mTask.git set instead of upd --- diff --git a/Devices/mTaskDevice.icl b/Devices/mTaskDevice.icl index a3b99a1..bb5b353 100644 --- a/Devices/mTaskDevice.icl +++ b/Devices/mTaskDevice.icl @@ -84,10 +84,9 @@ deleteDevice d = upd (\(r,s,ss)->(r,s,True)) (channels d) sendToDevice :: String (Main (ByteCode () Stmt)) (MTaskDevice, MTaskInterval) -> Task () sendToDevice wta mTask (device, timeout) = - get bcStateStore - @ (\st->toMessages timeout (toRealByteCode (unMain mTask) {st & sdss=[]})) + get bcStateStore @ toMessages timeout o toRealByteCode (unMain mTask) >>= \(msgs, st1)->set st1 bcStateStore @ toSDSRecords - >>= \sdss->upd ((++)sdss) sdsStore//MTaskShareaddToSDSShare + >>= \sdss->set sdss sdsStore//MTaskShareaddToSDSShare >>| makeShares sdss >>| sendMessage device msgs >>| makeTask wta -1