where
(ex, newls) = splitAt (bclength b - 1) ls
+derive gPrint BCShare
+
toMessages :: MTaskInterval (Main (ByteCode a b)) BCState -> ([MTaskMSGSend], BCState)
toMessages interval x s
# (bc, newstate) = toRealByteCode (unMain x) s
-# newsdss = 'DL'.difference s.sdss newstate.sdss
+# newsdss = 'DL'.difference newstate.sdss s.sdss
+| not (trace_tn $ printToString s.sdss) = undef
+| not (trace_tn $ printToString newstate.sdss) = undef
+| not (trace_tn $ printToString newsdss) = undef
= ([MTSds sdsi $ toByteCode e\\{sdsi,sdsval=(BCValue e)}<-newsdss] ++
[MTTask interval bc], newstate)
delete tasks when deleting device
-make sure shares are assigned to correct task and not propagated
let tasks have a unique name
add field in task that denotes to which device it belongs